Camera parameter set calculation method, recording medium, and camera parameter set calculation apparatus

ABSTRACT

A camera parameter set calculation method including (a1) acquiring a first image captured by a first camera and a second image captured by a second camera, (a2) acquiring camera parameter sets of the first and second cameras, (a3) extracting, from the first image, a predetermined portion having assumed three-dimensional position information, (a4) calculating three-dimensional coordinate sets corresponding to the predetermined portion on a basis of the assumed three-dimensional position information, the first image, and the first camera parameter set, (a5) determining first pixel coordinate pairs and second pixel coordinate pairs corresponding to the predetermined portion in the first image and second image, respectively, on the basis of the three-dimensional coordinate sets, (a6) calculating an evaluation value on the basis of pixel values at the first pixel coordinate pairs and pixel values at the second coordinate pairs, (a7) updating the camera parameter sets on the basis of the evaluation value.

BACKGROUND 1. Technical Field

The present disclosure relates to a camera parameter set calculation method, a recording medium, and a camera parameter set calculation apparatus.

2. Description of the Related Art

A driving safety support system of automobiles, a remote operation system of a mobile robot, and a security camera system for detecting a suspicious person, for example, require the image of the surroundings of the system and information about the three-dimensional coordinate sets corresponding to the image in order for a user and the system to make determination and perform control. A variety of techniques have been developed to acquire the three-dimensional coordinate sets of an object by stereopsis for binocular vision based on the images captured by all of cameras of a compound eye camera. For example, refer to the following literatures: Japanese Unexamined Patent Application Publication No. 2001-285692 (hereinafter referred to as “PTL 1”); Japanese Unexamined Patent Application Publication No. 6-167564 (hereinafter referred to as “PTL 2”); Japanese Unexamined Patent Application Publication No. 2007-24647 (hereinafter referred to as “PTL 3”); Japanese National Publication of International Patent Application No. 2003-528304 (hereinafter referred to as “PTL 4”); Roger Y. Tsai, “A Versatile Camera Calibration Technique for High-Accuracy 3D Machine Vision Metrology Using Off-the-Shelf TV Cameras and Lenses”, Journal of Robotics and Automation, IEEE, August 1987, Vol. RA-3, No. 4, pp. 323-344 (hereinafter referred to as “NPL 1”); C. Zach, T. Pock, and H. Bischof, “A duality based approach for realtime TV-L1 optical flow”, In Proceedings of the 29th DAGM conference on Pattern recognition, 2007, pp. 214-223 (hereinafter referred to as “NPL 2”); Takashi Matsuyama et al., “Computer Vision” Shin-Gijutsu Communications K.K., pp. 123-137 (hereinafter referred to as “NPL 3”); and Minoru Sasaki et al., “Sky and Cloud Segmentation Method for Day Time Sky Images”, FIT2012, Proceedings of the 11th Forum on Information Technology H-005, pp. 125-126 (hereinafter referred to as “NPL 4”). To obtain the three-dimensional coordinate sets of an object by stereopsis for binocular vision, a camera parameter set of each of the cameras, which is a set of a variety of camera parameters, is required. As used herein, the term “coordinate pair” refers to a single combination of coordinates for two axes. Similarly, the term “coordinate set” refers to a single combination of coordinates for three axes. Calculation of the camera parameter set is referred to as “camera calibration”. Camera calibration is described in detail in PTL 4 and NPL 1.

For example, according to the camera calibration technique described in NPL 1, pairs each including the three-dimensional coordinate set of a reference point serving as a reference for calibration and the pixel coordinate pair corresponding to the reference point are prepared and are input. In addition, the distance between a point obtained by projecting the reference point of three-dimensional coordinate set onto the image by using the camera parameters and the pixel coordinate pair corresponding to the reference point (the distance is also referred to as “reprojection error”) is calculated. Furthermore, a camera parameter set that minimizes the sum of reprojection errors of the reference points is calculated.

SUMMARY

According to existing calibration techniques, a reference point, a pair including the three-dimensional coordinate set of the reference point and the pixel coordinate pair corresponding to the reference point are needed. However, if the three-dimensional position of the reference point changes due to aged deterioration, an external force, a temperature change, or the like, and the three-dimensional coordinate set after change are unknown, it is difficult to correctly perform calibration.

One non-limiting and exemplary embodiment provides a camera parameter set calculation method, a recording medium, and a camera parameter set calculation apparatus that enable self-calibration of a camera without providing the three-dimensional coordinate set of a reference point in advance.

In one general aspect, the techniques disclosed here feature a camera parameter set calculation method including (a1) acquiring a first image captured by a first camera and a second image captured by a second camera, (a2) acquiring a first camera parameter set including one or more camera parameters of the first camera and a second camera parameter set including one or more camera parameters of the second camera, (a3) extracting, from the first image, a predetermined portion having assumed three-dimensional position information, (a4) calculating three-dimensional coordinate sets corresponding to the predetermined portion on a basis of the assumed three-dimensional position information, the first image, and the first camera parameter set, (a5) determining first pixel coordinate pairs of the predetermined portion of the first image on a basis of the three-dimensional coordinate sets corresponding to the predetermined portion and the first camera parameter set and determining second pixel coordinate pairs in the second image corresponding to the predetermined portion on a basis of the three-dimensional coordinate sets and the second camera parameter set, (a6) calculating an evaluation value on a basis of pixel values at the first pixel coordinate pairs in the first image and pixel values at the second coordinate pairs in the second image, (a7) updating the first camera parameter set and the second camera parameter set on a basis of the evaluation value, and (a8) outputting the updated first camera parameter set and second camera parameter set. At least one of processes (a1) to (a8) is performed by a processor.

According to the camera parameter set calculation technique of the present disclosure, it is possible to self-calibrate the camera without giving the three-dimensional coordinate set of a reference point in advance.

It should be noted that general or specific embodiments may be implemented as a system, an apparatus, a method, an integrated circuit, a computer program, a computer-readable storage medium (such as a recording disk), or any selective combination thereof. The computer-readable recording medium includes a nonvolatile recording medium, such as a compact disc-read only memory (CD-ROM).

Additional benefits and advantages of the disclosed embodiments will become apparent from the specification and drawings. The benefits and/or advantages may be individually obtained by the various embodiments and features of the specification and drawings, which need not all be provided in order to obtain one or more of such benefits and/or advantages.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic illustration of an existing calibration index;

FIG. 2 is a block diagram illustrating the functional configuration of a compound eye camera system according to a first embodiment;

FIG. 3A is a schematic illustration of an example of the configuration of an image capturing unit according to the first embodiment;

FIG. 3B is a schematic illustration of another example of the configuration of the image capturing unit according to the first embodiment;

FIG. 4 is a block diagram of an image processing unit of the compound eye camera system provided by a computer according to the first embodiment;

FIG. 5 is a flowchart illustrating an example of the flow of the operation performed to generate an image by the image processing unit according to the first embodiment;

FIG. 6A is a schematic illustration of an installation example of the compound eye camera system according to the first embodiment;

FIG. 6B is a schematic illustration of an example of a scene when an image is captured according to the first embodiment;

FIG. 7A is a schematic illustration of an example of the configuration of an image capturing unit according to the first embodiment;

FIG. 7B is a schematic illustration of an example of a captured image according to the first embodiment;

FIG. 8A is a schematic illustration of an example of an image according to the first embodiment;

FIG. 8B is a schematic illustration of an example of position information according to the first embodiment;

FIG. 9 is a schematic illustration of an example of a composite image output from an image generation unit according to the first embodiment;

FIG. 10 is a schematic illustration of the functional configuration of a camera parameter set calculation apparatus according to the first embodiment;

FIG. 11 is a flowchart illustrating an example of the flow of the operation performed by the image processing unit during self-calibration according to the first embodiment;

FIG. 12A illustrates an example of an image input in an example of an experiment of self-calibration;

FIG. 12B illustrates an example of an image input in an example of an experiment of self-calibration;

FIG. 13A illustrates an example of a relationship between a camera parameter and an evaluation value in an example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 13B illustrates an example of a relationship between a camera parameter and an evaluation value in an example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 13C illustrates an example of a relationship between a camera parameter and an evaluation value in an example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 13D illustrates an example of a relationship between a camera parameter and an evaluation value in the example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 14A illustrates an example of a relationship between a camera parameter and an evaluation value in an example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 14B illustrates an example of a relationship between a camera parameter and an evaluation value in an example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 14C illustrates an example of a relationship between a camera parameter and an evaluation value in an example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 15A illustrates an example of a relationship between a camera parameter and an evaluation value in an example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 15B illustrates an example of a relationship between a camera parameter and an evaluation value in an example of an experiment carried out under Experimental Condition 1 of self-calibration;

FIG. 16A illustrates an example of a relationship between the number of tests and an evaluation value in an example of an experiment carried out under Experimental Condition 2 of self-calibration;

FIG. 16B illustrates an example of a relationship between the number of tests and a reprojection error in an example of an experiment carried out under Experimental Condition 2 of self-calibration;

FIG. 17 is a schematic diagram illustrating the functional configuration of a camera parameter set calculation apparatus of a compound eye camera system according to a second embodiment;

FIG. 18 is a flowchart illustrating an example of the flow of the operation performed by an image processing unit during self-calibration according to the second embodiment;

FIG. 19 is a flowchart illustrating an example of the flow of a three-dimensional point group calculation process in FIG. 18 in detail;

FIG. 20 illustrates an example of a predetermined region extracted by the camera parameter set calculation apparatus according to the second embodiment; and

FIG. 21 is a block diagram illustrating the configuration of a compound eye camera system according to Modification 1.

DETAILED DESCRIPTION

Underlying Knowledge Forming Basis of the Present Disclosure

The present inventors have found that the following problem arises in the camera calibration described in the “Background” section. More specifically, in order for the user and the system to make determination and perform control in, for example, a driving safety support system for an automobile, a remote control system for a mobile robot, or a security camera system for detecting a suspicious person, the image of the surroundings of the system and the three-dimensional coordinate information corresponding to the image are needed. In particular, when an object that is monitored, such as a person and a vehicle, moves and, at the same time, the system itself moves together with, for example, an automobile or a robot having the system mounted therein, it is important to acquire the images with wider viewing angles and the three-dimensional coordinate sets corresponding to the images.

To acquire the three-dimensional coordinate set corresponding to images, so-called stereopsis for binocular vision is used, in general. In stereopsis for binocular vision, two images are acquired using two cameras that are located at different viewpoints such that the fields of view overlap. In addition, a pair of corresponding points included in the two images is estimated, and the three-dimensional coordinate set of a point on the object for the pair of corresponding points are calculated by using the pair of corresponding points and information such as the positions and orientations of the cameras obtained in advance.

Example of Existing Calibration Technique

For example, in order to acquire three-dimensional coordinate sets of an object from images captured by a compound eye camera through stereopsis for binocular vision, a camera parameter set of each of the cameras is needed. The term “camera parameter set” refers to the model of a camera and parameters corresponding to the model. The model of a camera and the parameters corresponding to the model represent a relationship between the three-dimensional coordinate set of a certain point in an image capturing space and the two-dimensional coordinate pair (also referred to as “pixel coordinate pair”) of a point on the image obtained by the camera. Calculation of the camera parameter set is referred to as “camera calibration”.

More specifically, the camera parameter set including two camera parameter sets, that is, an external parameter set and an internal parameter set. The external parameter set represents a positional relationship between a three-dimensional world coordinate system determined on the basis of the image capturing space of the camera and a three-dimensional camera coordinate system determined on the basis of the camera. The internal parameter set represents the relationship between the three-dimensional coordinate set of the object in the camera coordinate system and the position of the image of the object in the image captured by the camera.

In the camera calibration technique described in NPL 1, pairs each including the three-dimensional coordinate set of the reference point and the pixel coordinate pair corresponding to the reference point are prepared. These pairs serve as input elements, and a camera parameter set is calculated that minimizes the sum of the distances (the reprojection error) between the points obtained by projecting the reference points of the three-dimensional coordinate sets onto the image by using the camera parameters and the pixel coordinate pairs corresponding to the reference points.

In order to obtain the pairs each including the three-dimensional coordinate set of a reference point and the pixel coordinate pair corresponding to the reference point, a calibration index of a specific pattern is used, in general. An example of the calibration index is illustrated in FIG. 1. In the example illustrated in FIG. 1, grid-like patterns are arranged inside a box-shaped object at predetermined intervals. A grid point, that is, a corner of the pattern is defined as a reference point, and the design value of the three-dimensional coordinate set of the grid point corresponding to the reference point or the three-dimensional coordinate set of a reference point measured after setting the reference point is held. In addition, the image of the reference point is captured by the camera, and the pixel coordinate pair of the image of the grid point corresponding to the reference point is estimated through image processing. In this manner, the information regarding a pair including the three-dimensional coordinate set of the reference point and pixel coordinate pair corresponding to the reference point is obtained. The calibration technique using such a calibration index is effective for calibration in, for example, a factory after the camera is manufactured because highly accurate calibration can be performed, although the calibration technique requires equipment having a calibration index.

Note that, in addition to calibration at the time of manufacturing, camera calibration is needed if the camera parameter set has changed during the operation of an apparatus having the camera mounted therein due to, for example, the influence of aged deterioration, deformation of the apparatus caused by an external force, and a temperature change. For a driving safety support system of an automobile, a remote control system of a mobile robot, a security camera system and the like, it is desirable that the calibration technique do not require equipment or the like having the calibration index and do not need manual operation. That is, a calibration technique using self-calibration is desirable. As used herein, the term “self-calibration” refers to automatic updating of the camera parameter set performed by a system including the camera.

PTL 4 discloses a self-calibration technique in which a system automatically calibrates a stereo camera mounted in a vehicle. According to the technique described in PTL 4, instead of using a calibration index of a specific pattern, such as a grid pattern, a stationary object in the field of view of the camera is stored as a target of calibration. If the position of the target of calibration changes, the camera performs self-calibration by using the information regarding the three-dimensional coordinate sets of the target of calibration.

However, according to an existing calibration technique, it is assumed that the three-dimensional coordinate set of the target of calibration are obtained in advance and stay unchanged. Consequently, if the three-dimensional coordinate sets of the target of calibration change due to, for example, the influence of aged deterioration, an external force, or a temperature change, correct calibration cannot be performed. To solve the above-described problem, the present inventors invented a technique for enabling a camera to perform self-calibration even when the three-dimensional coordinate set of the calibration reference point is not provided in advance, as described below.

According to an aspect of the present disclosure, a camera parameter set calculation method including (a1) acquiring a first image captured by a first camera and a second image captured by a second camera, (a2) acquiring a first camera parameter set including one or more camera parameters of the first camera and a second camera parameter set including one or more camera parameters of the second camera, (a3) extracting, from the first image, a predetermined portion having assumed three-dimensional position information, (a4) calculating three-dimensional coordinate sets corresponding to the predetermined portion on a basis of the assumed three-dimensional position information, the first image, and the first camera parameter set, (a5) determining first pixel coordinate pairs of the predetermined portion of the first image on a basis of the three-dimensional coordinate sets corresponding to the predetermined portion and the first camera parameter set and determining second pixel coordinate pairs in the second image corresponding to the predetermined portion on a basis of the three-dimensional coordinate sets and the second camera parameter set, (a6) calculating an evaluation value on a basis of pixel values at the first pixel coordinate pairs in the first image and pixel values at the second coordinate pairs in the second image, (a7) updating the first camera parameter set and the second camera parameter set on a basis of the evaluation value, and (a8) outputting the updated first camera parameter set and second camera parameter set. At least one of processes (a1) to (a8) is performed by a processor.

According to the above-described aspect, the camera parameter set of the first camera and the camera parameter set of the second camera can be calculated on the basis of the evaluation value. The pixel values used to calculate the evaluation value are extracted from the first image and the second image. The predetermined portion is a portion having third-dimensional position information set therefor on the basis of an assumption. The predetermined portion is not a reference having a known accurate coordinate set, such as a calibration index. That is, the predetermined portion is a portion extracted from the captured image of an object in the first image and the second image. As a result, to associate a third-dimensional coordinate set with a pixel coordinate pair in a calculation process of a camera parameter set, equipment with a calibration index including a known reference point is not needed. That is, according to the present aspect, since the three-dimensional coordinate set of a reference point obtained in advance is not used, self-calibration of the camera can be correctly performed regardless of a change in the reference point due to the influence of aged deterioration, an external force, a temperature change or the like.

In addition, since the predetermined portion is a portion having three-dimensional position information set therefor on the basis of an assumption, the three-dimensional coordinate sets corresponding to the predetermined portion can be calculated on the basis of the three-dimensional position information, the first image, and the first camera parameter set. For example, according to a technique of estimating corresponding points of the same object in two images and calculating the three-dimensional coordinate set for the corresponding points by using the pixel coordinate pairs of the two estimated corresponding points, that is, according to stereopsis for binocular vision, the resultant three-dimensional coordinate set is influenced by the estimation accuracy of the corresponding points. However, according to the present aspect, to calculate the third-dimensional coordinate set, the predetermined portion having the third-dimensional position information set therefor is used instead of using estimated corresponding points. Consequently, the influence of the estimation accuracy of the corresponding points can be reduced. Therefore, self-calibration of the camera can be accurately performed.

When the first camera parameter set and the second camera parameter set are correct, the pixel value of the first image at the first pixel coordinate pair and the pixel value of the second image at the second pixel coordinate pair corresponding to the three-dimensional coordinate set of a given point are the same. As the difference between the first camera parameter set or the second camera parameter set and the correct solution value increases, that is, as an error in the first camera parameter set or the second camera parameter set increases, the difference between the pixel values in the first image and the second image increases. Accordingly, if the first camera parameter set or the second camera parameter set includes an error, the first camera parameter set and the second camera parameter set are updated such that for example, the error is minimized on the basis of the difference between the pixel values in the first image and the second image. In this manner, the correct camera parameter sets can be obtained. That is, the first and second cameras can be calibrated.

In addition, according to the aspect of the present disclosure, the camera parameter set calculation method may further include (b1) extracting, from the first image, a non-predetermined portion representing a portion of the first image other than the predetermined portion, (b2) calculating a three-dimensional coordinate set on an object included in the non-predetermined portion on a basis of the first image, the second image, the first camera parameter set, and the second camera parameter set, and (b3) determining a first target pixel coordinate pair of a point obtained by projecting the three-dimensional coordinate set onto the first image on the basis of the first camera parameter set and determining a second target pixel coordinate pair of a point obtained by projecting the three-dimensional coordinate set onto the second image on the basis of the second camera parameter set. In process (a6), the evaluation value may be calculated on a basis of a relationship between the pixel value at the first pixel coordinate pair in the first image and the pixel value at the second pixel coordinate pair in the second image and a relationship between the pixel value at the first target pixel coordinate pair in the first image and the pixel value at the second target pixel coordinate pair in the second image, and at least one of processes (a1) to (a8) and (b1) to (b4) may be performed by a processor.

According to the above-described aspect, in terms of the non-predetermined portion, the first pixel coordinate pair and the second pixel coordinate pair corresponding to two pixel values used to calculate the evaluation value are not the references set in advance (such as a calibration index). For this reason, like the predetermined portion, in terms of the non-predetermined portion, equipment having a calibration index including a known reference point is not needed to associate a third-dimensional coordinate set with a pixel coordinate pair during a process to calculate a camera parameter set. Since the evaluation value is calculated by using the data of the predetermined portion and the data of the non-predetermined portion, the evaluation value can reflect a wide area of the first image and the second image. Thus, the calculation accuracy of the first camera parameter set and the second camera parameter set can be increased on the basis of the evaluation value.

In addition, according to the camera parameter set calculation method from the aspect of the present disclosure, process (b2) may include estimating a pair of corresponding points in the non-predetermined portion and the second image, and the three-dimensional coordinate set may correspond to the pair of corresponding points.

In addition, according to the camera parameter set calculation method from the aspect of the present disclosure, in process (a6), differences between the pixel values at the first pixel coordinate pairs in the first image and the pixel values at the second coordinate pairs in the second images may be used to calculate the evaluation value.

According to the above-described aspect, if there is a difference between the pixel value of the image of an object in the first image and the pixel value of the image of the object in the second image (between the pixel values corresponding to each other), it can be determined that the first camera parameter set and the second parameter set have an error from the true value. Therefore, it can be easily determined whether the first camera parameter set and the second camera parameter set are acceptable or not. Furthermore, for example, by changing or updating the first camera parameter set and the second camera parameter set such that the above-described difference is decreased, the first camera parameter set and the second camera parameter set can be optimized.

According to the camera parameter set calculation method from the aspect of the present disclosure, in process (a3), a second predetermined portion that differs from the predetermined portion may be extracted from the first image, and the second predetermined portion may have second assumed three-dimensional position information that differs from the assumed three-dimensional position information. In process (a4), second three-dimensional coordinate sets corresponding to the second predetermined portion may be calculated on a basis of the second assumed three-dimensional position information, the first image, and the first camera parameter set. In process (a5), third pixel coordinate pairs of the second predetermined portion in the first image may be determined on a basis of the second three-dimensional coordinate sets and the first camera parameter set, and fourth pixel coordinate pairs corresponding to the second predetermined portion in the second image may be determined on a basis of the second three-dimensional coordinate sets and the second camera parameter set. In process (a6), the evaluation value may be calculated on a basis of first differences between the pixel values at the first pixel coordinate pairs in the first image and the pixel values at the second pixel coordinate pairs in the second image and second differences between the pixel values at the third pixel coordinate pairs in the first image and the pixel values at the another second-pixel coordinate pairs in the second image.

According to the above-described aspect, by using differences, the accuracy of the evaluation value is improved. In addition, for example, by updating the first camera parameter set and the second camera parameter set such that the sum of the differences is reduced, the first camera parameter set and the second camera parameter set can be optimized.

According to the camera parameter set calculation method from the aspect of the present disclosure, in process (a6), each of the first differences may be an absolute value of a difference between the pixel value at the first pixel coordinate pair in the first image and the pixel value at the second pixel coordinate pair in the second image, and each of the second differences may be an absolute value of a difference between the pixel value at the third pixel coordinate pair in the first image and the pixel value at the fourth pixel coordinate pair in the second image, and the third pixel coordinate pairs includes the third pixel coordinate pair and the fourth pixel coordinate pairs includes the fourth pixel coordinate pair. According to the above aspect, by using the absolute value of the difference, the differences are not canceled out. As a result, an accurate evaluation value can be calculated.

In addition, according to the camera parameter set calculation method from the aspect of the present disclosure, the predetermined portion may represent an image of the sky. The third-dimensional position information may include information about the assumed three-dimensional distance between the sky and the first camera, and the assumed three-dimensional distance between the sky and the first camera may be set to a value considerably larger than a three-dimensional distance between the first camera and the second camera. According to the above aspect, the assumed three-dimensional distance between the sky and the first camera can be set to an extremely large value, such as 10000 m or infinity. Thus, the assumed three-dimensional position of the sky can be easily set.

In addition, according to the camera parameter set calculation method from the aspect of the present disclosure, the predetermined portion may represent an image of a plane formed by an object in three-dimensional space, and the third-dimensional position information may include an assumed three-dimensional position of the plane. According to the above aspect, the assumed three-dimensional position of the plane can be easily set.

In addition, according to the camera parameter set calculation method from the aspect of the present disclosure, the plane may represent a road surface. According to the above aspect, since the road surface is substantially horizontal, the assumed three-dimensional position of the road surface can be easily set with high accuracy.

In addition, according to the camera parameter set calculation method from the aspect of the present disclosure, the plane may represent a ceiling surface of a structure. According to the above aspect, since the ceiling surface is substantially horizontal, the assumed three-dimensional position of the ceiling surface can be easily set with high accuracy.

In the camera parameter set calculating method according to the aspect of the present disclosure, the plane may be a wall surface of a structure. According to the above aspect, since the wall surface is substantially vertical, the assumed three-dimensional position of the wall surface can be easily set with high accuracy.

In addition, according to the camera parameter set calculation method from the aspect of the present disclosure, current position information may be acquired from a range finder, and the current position information may include position information about the predetermined portion around the first camera. According to the above aspect, the position information of the first camera and its surroundings can be obtained in real time. Thus, the assumed three-dimensional position information of a predetermined portion can be determined in accordance with the position of the first camera. As a result, the accuracy of the assumed three-dimensional position information of the predetermined portion can be improved.

According to an aspect of the present disclosure, a non-transitory computer-readable recording medium stores a control program executable by an apparatus including a processor. The control program comprises code to perform: (a1) acquiring a first image captured by a first camera and a second image captured by a second camera, (a2) acquiring a first camera parameter set including one or more camera parameters of the first camera and a second camera parameter set including one or more camera parameters of the second camera, (a3) extracting, from the first image, a predetermined portion having assumed three-dimensional position information, (a4) calculating three-dimensional coordinate sets corresponding to the predetermined portion on a basis of the assumed three-dimensional position information, the first image, and the first camera parameter set, (a5) determining first pixel coordinate pairs of the predetermined portion of the first image on a basis of the three-dimensional coordinate sets corresponding to the predetermined portion and the first camera parameter set and determining second pixel coordinate pairs in the second image corresponding to the predetermined portion on a basis of the three-dimensional coordinate sets and the second camera parameter set, (a6) calculating an evaluation value on a basis of pixel values at the first pixel coordinate pairs in the first image and pixel values at the second coordinate pairs in the second image, (a7) updating the first camera parameter set and the second camera parameter set on a basis of the evaluation value, and (a8) outputting the updated first camera parameter set and second camera parameter set. According to the above aspect, an effect that is the same as the effect of the camera parameter set calculation method from the above-described aspect can be provided.

According to an aspect of the present disclosure, a camera parameter set calculation apparatus includes a processing circuit that calculates camera parameters of at least two cameras. The processing circuit performs the following operations: (a1) acquiring a first image captured by a first camera of the at least two cameras and a second image captured by a second camera of the at least two cameras, (a2) acquiring a first camera parameter set including one or more camera parameters of the first camera and a second camera parameter set including one or more camera parameters of the second camera, (a3) extracting, from the first image, a predetermined portion having assumed three-dimensional position information, (a4) calculating three-dimensional coordinate sets corresponding to the predetermined portion on a basis of the assumed three-dimensional position information, the first image, and the first camera parameter set, (a5) determining first pixel coordinate pairs of the predetermined portion of the first image on a basis of the three-dimensional coordinate sets corresponding to the predetermined portion and the first camera parameter set and determining second pixel coordinate pairs in the second image corresponding to the predetermined portion on a basis of the three-dimensional coordinate sets and the second camera parameter set, (a6) calculating an evaluation value on a basis of pixel values at the first pixel coordinate pairs in the first image and pixel values at the second coordinate pairs in the second image, (a7) updating the first camera parameter set and the second camera parameter set on a basis of the evaluation value, and (a8) outputting the updated first camera parameter set and second camera parameter set. According to the above aspect, an effect that is the same as the effect of the camera parameter set calculation method from the above-described aspect can be provided.

It should be noted that general or specific embodiments may be implemented as a system, an apparatus, a method, an integrated circuit, a computer program, a computer-readable storage medium (such as a recording disk), or any selective combination thereof. The computer-readable recording medium includes a nonvolatile recording medium, such as a compact disc-read only memory (CD-ROM).

A camera parameter set calculation apparatus and the like according to embodiments are described below with reference to the accompanying drawings. It is to be noted that each of the embodiments described below represents a general or specific example. A value, a shape, a material, a constituent element, the positions and the connection form of the constituent elements, steps (a process flow), and the sequence of steps described in the embodiments are only examples and shall not be construed as limiting the scope of the present disclosure. In addition, among the constituent elements in the embodiments described below, the constituent element that does not appear in an independent claim, which has the broadest scope, is described as an optional constituent element. In addition, the word “substantially” to modify, for example, the word “parallel” or “perpendicular” may be used in the following description of the embodiments. For example, “substantially parallel” encompasses perfectly parallel as well as not perfectly parallel but roughly parallel with a maximum allowance of a few percent. The same applies to other words modified by the word “substantially”.

First Embodiment

1-1. Configuration of Compound Eye Camera System

1-1-1. Architecture of Compound Eye Camera System

The compound eye camera system 10 including the camera parameter set calculation apparatus 111 according to the first embodiment of the present disclosure is described below. Although not limited to this camera system, according to the present embodiment, the compound eye camera system 10 is an in-vehicle compound eye camera system using the camera parameter set calculation apparatus 111. FIG. 2 is a block diagram illustrating the functional configuration of the compound eye camera system 10 including the camera parameter set calculation apparatus 111 according to the first embodiment. As illustrated in FIG. 2, the compound eye camera system 10 includes an image capturing unit 100, an image processing unit 110, and a display 120.

The image capturing unit 100 captures and acquires an image and outputs the image to the image processing unit 110. The image capturing unit 100 includes two or more cameras 101. According to the present embodiment, the image capturing unit 100 includes two cameras 101 a and 101 b. The image processing unit 110 processes the image captured by the image capturing unit 100 and outputs the result of processing to the display 120 or the like. The image processing unit 110 includes the camera parameter set calculation apparatus 111, a position calculation unit 112, an image generation unit 113, and a camera parameter storage unit 114. The camera parameter set calculation apparatus 111 is also referred to as a “self-calibration unit”. In addition, the display 120 displays images and the like output from the image processing unit 110. The display 120 may be formed from a display panel, such as a liquid crystal panel or an organic or inorganic electro luminescence (EL) panel. Note that the suffixes a to d are used to distinguish similar constituent elements. However, hereinafter, when these constituent elements need not be distinguished from one another, only the reference symbol without any suffix may be used as appropriate.

The compound eye camera system 10 mainly performs two types of operations: image generation and self-calibration. At the time of image generation, the image capturing unit 100 captures an image and outputs the image to the image processing unit 110. The image processing unit 110 calculates three-dimensional coordinate sets of an object from the input image and generates an image on the basis of the calculated three-dimensional coordinate sets. Thereafter, the image processing unit 110 outputs the generated image and displays the image on the display 120. At the time of self-calibration, the image capturing unit 100 captures an image and outputs the image to the image processing unit 110. The camera parameter set calculation apparatus 111 of the image processing unit 110 updates the camera parameter set stored in the camera parameter storage unit 114. Note that the two types of operations, namely, image generation and self-calibration may be performed simultaneously or separately.

1-1-2. Configuration of Image Capturing Unit

FIG. 3A is a schematic illustration of an example of the configuration of the image capturing unit 100 of the compound eye camera system 10. In FIG. 3A, an example of the image capturing unit 100 having a configuration in which two cameras 101 are integrated into one unit is illustrated. FIG. 3A(a) is a front view of the image capturing unit 100. FIG. 3A(b) is a side view of the image capturing unit 100, and FIG. 3A(c) is a cross-sectional view of the image capturing unit 100. The cross-sectional view is taken along a plane crossing a line passing through the centers of two lenses of the two cameras 101 of the image capturing unit 100. The lens of each of the two cameras 101 constituting the image capturing unit 100 is a fisheye lens.

While the compound eye camera system 10 according to the present embodiment is described with reference to the image capturing unit 100 being a two-eye camera including two cameras, the number of cameras included in the image capturing unit 100 is not limited to two. The number of cameras may be three or more. That is, the image capturing unit 100 may be configured to include two or more cameras. For example, as illustrated in FIG. 3B, the image capturing unit 100 may be a tri-eye camera configured with three cameras 101. Such an image capturing unit 100 has a configuration in which three cameras 101 are integrated into one body, instead of having two cameras 101. In FIG. 3B, FIG. 3B(a) is a front view of the image capturing unit 100, and FIG. 3B(b) is a side view of the image capturing unit 100. Note that as illustrated in FIGS. 3A and 3B, the distance between the optical axes of the cameras 101 that are adjacent to each other is referred to as a “baseline length”. In the image capturing unit 100, an imaging device is disposed on the optical axis of each of the cameras 101. In addition, in the image capturing unit 100, the cameras 101 need not be integrated into one body and may be separately arranged. Furthermore, the cameras 101 that are separately arranged need not be disposed so as to be close to each other.

Any imaging device having a configuration that receives light incident through the lens of the camera 101 and forms an image from the received light can be employed. For example, the image sensor may be a complementary metal-oxide semiconductor (CMOS) image sensor or a charge coupled device (CCD) sensor.

The image capturing unit 100 includes two cameras 101 a and 101 b each having a fisheye lens with a viewing angle of approximately 180 degrees. The two cameras 101 a and 101 b are arranged as illustrated in FIG. 3A. Each of the cameras 101 a and 101 b captures an image in the field of view, and two images are output (hereinafter, the image is also referred to as a “camera image”).

1-1-3. Configuration of Image Processing Unit

The configuration of the image processing unit 110 is described with reference to FIG. 2. As described above, the image processing unit 110 includes a camera parameter set calculation apparatus 111, a position calculation unit 112, an image generation unit 113, and a camera parameter storage unit 114.

The camera parameter storage unit 114 prestores at least the camera parameter set of each of the cameras 101 a and 101 b and occlusion information which is information regarding an area occluded in the camera image by the image capturing unit 100. The camera parameter set of each of the cameras 101 a and 101 b may include an external parameter set, such as the position and orientation of the camera, and an internal parameter set, such as the distortion and focal length of the lens of the camera.

The camera parameter set calculation apparatus 111, which serves as the self-calibrating unit, updates the camera parameter sets stored in the camera parameter storage unit 114 by using the camera images captured by the cameras 101 a and 101 b and an initial camera parameter sets of the cameras 101 a and 101 b stored in the camera parameter storage unit 114. The initial camera parameter sets may be the camera parameter sets of the cameras 101 a and 101 b already stored in the camera parameter storage unit 114. For example, the initial camera parameter sets may be camera parameter sets that are set at the time of design of the cameras 101 a and 101 b or may be camera parameter sets that are set for the cameras 101 a and 101 b at the use stage.

The position calculation unit 112 estimates a pair of corresponding points in two camera images output from the cameras 101 a and 101 b. When images of the same object appears in two camera images taken by two cameras, that is, when the first camera image taken by the first camera has the first image of the same point on the object, at the first point in the first camera image, and the second camera image taken by the second camera has the second image of the same point on the object, at the second point in the second camera image, each of the first point and the second point at which these two images of the same point on the object are shown is called a corresponding point, and the pair of the two points at which these two images of the same point on the object are shown is called a pair of corresponding points. More specifically, estimating the pair of corresponding points means calculating the pixel coordinate pair of each of the corresponding points in the pair. In addition, the position calculation unit 112 reads the camera parameter sets of the cameras 101 a and 101 b from the camera parameter storage unit 114. The position calculation unit 112 calculates a location of a point on the three-dimensional object whose images are shown in the camera images, that is, a three-dimensional coordinate set of the point on the object, on the basis of the pair of corresponding points and the external parameter set and the internal parameter set included in each of the camera parameter sets. Thereafter, the position calculation unit 112 outputs the calculated three-dimensional coordinate set and the pair of pixel coordinate pairs of the corresponding points together as the position information of the point on the three-dimensional object, that is, the point on the object. Each of the points is not necessary recognized as a dot. Each of the points can mean a portion. In other words, the point on the three-dimensional object can be a portion on the three-dimensional object, the point on the object can be a portion on the object, the corresponding point can be a corresponding portion, and the pair of corresponding points can be a pair of corresponding portions.

The image generation unit 113 generates a composite image on the basis of the two camera images and the position information of the three-dimensional object calculated by the position calculation unit 112. Thereafter, the image generation unit 113 outputs the composite image. More specifically, the composite image to be generated is the image of a three-dimensional object in the image capturing space and is a composite image based on three-dimensional coordinate sets of the three-dimensional object.

Each of the constituent elements constituting the image processing unit 110 in the compound eye camera system 10 illustrated in FIG. 2 may be implemented by hardware, such as an electronic circuit or an integrated circuit, or software, such as a program executed on a computer.

An example of the hardware configuration of the image processing unit 110 is described below with reference to FIG. 4. FIG. 4 illustrates an example of the hardware configuration of the compound eye camera system 10. The compound eye camera system 10 includes the image capturing unit 100, a computer 300 corresponding to the image processing unit 110, and the display 120. In the compound eye camera system 10, the image capturing unit 100 captures an image and outputs the image, and the computer 300 operates as the image processing unit 110. Thus, an image is generated and output. The display 120 displays the image generated by the computer 300.

The computer 300 includes a central processing unit (CPU) 301, a read only memory (ROM) 302, a random access memory (RAM) 303, a hard disk drive (HDD) 304, a video input interface (I/F) 305, and a video card 306.

A program that operates the computer 300 is held in the ROM 302 or the HDD 304 in advance. The program is loaded from the ROM 302 or the HDD 304 onto the RAM 303 by the CPU 301 (a processor).

The CPU 301 executes each of coded instructions in the program loaded onto the RAM 303. In accordance with execution of the program, the video input I/F 305 loads an image captured by the image capturing unit 100 into the RAM 303. The video card 306 processes the image generated in accordance with the execution of the program and outputs the image to the display 120, which displays the image.

Note that instead of being stored in the ROM 302, which is a semiconductor device, or the HDD 304, the computer program may be stored in a recording medium, such as a CD-ROM. Alternatively, the computer program may be transmitted via a wired network, a wireless network, a broadcast, or the like, and may be loaded into the RAM 303 of the computer 300.

1-2. Operation Performed by Compound Eye Camera System

The operation performed by the compound eye camera system 10 is described below. More specifically, the operation performed at the time of image generation and the operation performed at the time of self-calibration in the compound eye camera system 10 are described below in sequence.

1-2-1. Operation for Image Generation

The operation performed by the compound eye camera system 10 at the time of image generation is described with reference to FIG. 5. FIG. 5 is a flowchart illustrating an example of the operation performed by the image processing unit 110 of the compound eye camera system 10 at the time of image generation. As illustrated in FIG. 5, the operation performed at the time of image generation includes a process for reading the camera parameter set in step S401, a process for calculating a position in step S402, and a process for generating an image in step S403. Each of the operations illustrated in FIG. 5 may be executed by the computer 300 illustrated in FIG. 4.

Although not limited to the following, according to the present embodiment, an example in which the compound eye camera system 10 is installed in an automobile is described. More specifically, the compound eye camera system 10 acquires a camera image behind the automobile and the three-dimensional coordinate sets corresponding to the camera image, detects an obstacle, and displays the result of detection on a display disposed in the automobile. In this manner, the compound eye camera system 10 presents the situation behind the vehicle body to the driver (the user).

FIG. 6A is a plan view illustrating an installation example of the compound eye camera system 10 in an automobile. The image capturing unit 100 is installed in the rear portion of the vehicle body so as to face rearward such that the optical axis of the camera 101 substantially coincides with the front-rear direction of the automobile. The image processing unit 110 and the display 120 are installed in the compartment of the automobile so as to be visible to the driver. FIG. 6B is a plan view illustrating an example of a scene when an image is captured by the compound eye camera system 10 mounted on the automobile. Although not limited to the following example, according to the present embodiment, the two cameras 101 a and 101 b of the image capturing unit 100 capture and output the images at predetermined time intervals in synchronization with each other.

FIGS. 7A(a) and 7A(b) are a front view and a rear view, respectively, illustrating an example of the arrangement of the two cameras 101 a and 101 b in the image capturing unit 100. FIG. 7B illustrates examples of images captured by the two cameras 101 a and 101 b illustrated in FIG. 7A in the image capturing scene illustrated in FIG. 6B. The viewing angle of each of the cameras 101 a and 101 b is approximately 180 degrees. As can be seen from FIG. 7B, the same objects appear in almost entire field of view of each of the cameras 101 a and 101 b.

The computer 300 performs the processes in steps S401 to S403 in FIG. 5 by executing a predetermined program simultaneously with the operation performed by the image capturing unit 100. The processes in steps S401 to S403 performed by the computer 300 are described in detail below with reference to FIGS. 7A to 12B.

In step S401, the position calculation unit 112 reads, from the camera parameter storage unit 114, the camera parameter sets including the internal parameter sets and the external parameter sets of the cameras 101 a and 101 b and the occlusion information, which are stored in the camera parameter storage unit 114 in advance.

The relationship between an external parameter set M of the camera and the three-dimensional coordinate set and the relationship between an internal parameter set (f, dpx, dpy, cu, cv) of the camera and the three-dimensional coordinate set and pixel coordinate pair are given by the following equations (1) to (3):

$\begin{matrix} {\mspace{79mu}{{\begin{pmatrix} x_{e} \\ y_{e} \\ z_{e} \\ 1 \end{pmatrix} = {M\begin{pmatrix} x_{w} \\ y_{w} \\ z_{w} \\ 1 \end{pmatrix}}},\mspace{31mu}{M = \begin{pmatrix} r_{00} & r_{01} & r_{02} & t_{X} \\ r_{10} & r_{11} & r_{12} & t_{Y} \\ r_{20} & r_{21} & r_{22} & t_{Z} \\ 0 & 0 & 0 & 1 \end{pmatrix}}}} & (1) \\ {\begin{pmatrix} r_{00} & r_{01} & r_{02} \\ r_{10} & r_{11} & r_{12} \\ r_{20} & r_{21} & r_{22} \end{pmatrix} = {{\begin{pmatrix} {\cos\;{Rz}} & {{- \sin}\;{Rz}} & 0 \\ {\sin\;{Rz}} & {\cos\;{Rz}} & 0 \\ 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} {\cos\;{Ry}} & 0 & {\sin\;{Ry}} \\ 0 & 1 & 0 \\ {{- \sin}\;{Ry}} & 0 & {\cos\;{Ry}} \end{pmatrix}\begin{pmatrix} 1 & 0 & 0 \\ 0 & {\cos\;{Rx}} & {{- \sin}\;{Rx}} \\ 0 & {\sin\;{Rx}} & {\cos\;{Rx}} \end{pmatrix}} = \begin{pmatrix} {\cos\;{Ry}\;\cos\;{Rz}} & \begin{matrix} {{{- \cos}\;{Rx}\;\sin\;{Rz}} +} \\ {\sin\;{Rx}\;\sin\;{Ry}\;\cos\;{Rz}} \end{matrix} & \begin{matrix} {{\sin\;{Rx}\;\sin\;{Rz}} +} \\ {\cos\;{Rx}\;\sin\;{Ry}\;\cos\;{Rz}} \end{matrix} \\ {\cos\;{Ry}\;\sin\;{Rz}} & \begin{matrix} {{\cos\;{Rx}\;\cos\;{Rz}} +} \\ {\sin\;{Rx}\;\sin\;{Ry}\;\sin\;{Rz}} \end{matrix} & \begin{matrix} {{{- \sin}\;{Rx}\;\cos\;{Rz}} +} \\ {\cos\;{Rx}\;\sin\;{Ry}\;\sin\;{Rz}} \end{matrix} \\ {{- \sin}\;{Ry}} & {\sin\;{Rx}\;\cos\;{Ry}} & {\cos\;{Rx}\;\cos\;{Ry}} \end{pmatrix}}} & (2) \\ {\left. \mspace{79mu}\begin{matrix} {u = {{\frac{1}{dpx}f\frac{x_{e}}{z_{e}}} + {cu}}} \\ {v = {{\frac{1}{dpy}f\frac{y_{e}}{z_{e}}} + {cv}}} \end{matrix} \right\}.} & (3) \end{matrix}$

The external parameter set M in Equation (1) above is an external parameter set representing the positional relationship between the world coordinate system and the camera coordinate system. The external parameter set M is expressed by a 4×4 matrix that transforms the three-dimensional coordinate set (x_(w), y_(w), z_(w)) of the world coordinate system into the three-dimensional coordinate set (x_(e), y_(e), z_(e)) of the camera coordinate system. As indicated by Equations (1) and (2), the external parameter set M represents the rotation (Rx, Ry, Rz) about the X, Y, and Z axes of the world coordinate system and the translation (tx, ty, tz) in the X-, Y-, and Z-axis directions of the world coordinate system. Equation (3) above expresses the relationship between the three-dimensional coordinate set (x_(e), y_(e), z_(e)) of the camera coordinate system and the pixel coordinate pair (u, v). fin the internal parameter set represents the focal length of the camera, dpx and dpy represent pixel sizes in the x direction and the y direction of the imaging device of the camera, respectively, (cu, cv) represents the pixel coordinate pair of the intersection point of the Z_(e) axis of the camera coordinate system and the imaging surface of the camera. Note that when the digital image is considered as a set of “values (that is, the pixel values) at two-dimensional grid points (that is, the pixel coordinate pairs)”, the positions of the pixels of an image are represented by two-dimensional pixel coordinate pairs.

The external parameter set M and the internal parameter set (f, dpx, dpy, cu, cv) are obtained beforehand by using the above-described existing camera calibration technique. Note that to calculate dpx, dpy and f, Equations (1) and (3) above do not provide the sufficient constraint conditions. Therefore, the design value of any one of dpx, dpy, and f may be used, and the other two parameters may be calculated by using the above-described existing camera calibration technique.

While a perspective projection model (also referred to as a “pinhole camera model”) is used in the above-described equation (3) as the projection model of the lens, the projection model is not limited thereto. Another projection model, such as an equidistant projection model, a stereographic projection model, or an equisolid angle projection model, may be used. For example, in the case of an equidistant projection model, instead of using the internal parameter set in Equation (3), an internal parameter set given by the following equation (4) is used:

$\begin{matrix} {\left. \begin{matrix} {u = {{\frac{1}{dpx}\frac{x_{e}}{\sqrt{x_{e}^{2} + y_{e}^{2}}}f\;\theta} + {cu}}} \\ {v = {{\frac{1}{dpy}\frac{y_{e}}{\sqrt{x_{e}^{2} + y_{e}^{2}}}f\;\theta} + {cv}}} \\ {\theta = {\tan^{- 1}\left( \frac{\sqrt{x_{e}^{2} + y_{e}^{2}}}{z_{e}} \right)}} \end{matrix} \right\}.} & (4) \end{matrix}$

Note that for simplicity of description, the cameras 101 a and 101 b are also referred to as cameras i and j, respectively. In this case, the external parameter sets M_(i) and M_(j) representing the positional relationship between the cameras i and j can be given as follows:

$\begin{matrix} {\begin{pmatrix} x_{j} \\ y_{j} \\ z_{j} \\ 1 \end{pmatrix} = {{M_{j}{M_{i}^{- 1}\begin{pmatrix} x_{i} \\ y_{i} \\ z_{i} \\ 1 \end{pmatrix}}} = {{M_{i,j}\begin{pmatrix} x_{i} \\ y_{i} \\ z_{i} \\ 1 \end{pmatrix}}.}}} & (5) \end{matrix}$

In addition, a camera parameter set that summarizes the internal parameter set and the external parameter set of the camera 101 a is represented by C_(a) as illustrated in the following Equation (6), and a camera parameter set that summarizes the internal parameter set and the external parameter set of the camera 101 b is represented by C_(b) as illustrated in the following Equation (7): C _(a)=(f _(a) ,dpx _(a) ,dpy _(a) ,cu _(a) ,cv _(a) ,M _(a))  (6) C _(b)=(f _(b) ,dpx _(b) ,dpy _(b) ,cu _(b) ,cv _(b) ,M _(b))  (7).

In step S402, the position calculation unit 112 acquires two camera images of the same object captured by the cameras 101 a and 101 b of the image capturing unit 100. Thereafter, the position calculation unit 112 calculates the three-dimensional coordinate set of the point on the object for the pair of corresponding points in the two camera images by stereopsis for binocular vision based on the two acquired camera images and the camera parameter sets of the cameras 101 a and 101 b read in step S401. More specifically, the position calculation unit 112 estimates and extracts a pair of points, that is, a pair of corresponding points. One of the points is included in one of the camera images of the cameras 101 a and 101 b and the other of the points is included in the other of the camera images of the cameras 101 a and 101 b and the two points correspond to each other. In addition, the position calculation unit 112 calculates the three-dimensional coordinate set of a point on the object corresponding to the pair of corresponding points by using the principle of triangulation with the help of the parallax of the point on the object with respect to the two points included in the pair of corresponding points. In this manner, the three-dimensional coordinate set of the point on the object corresponding to the points included in the camera images are calculated. Note that the position calculation unit 112 extracts pairs of corresponding points and calculates the three-dimensional coordinate sets of the points on the object each corresponding to the pairs of corresponding points. The pairs of corresponding points have a one-to-one correspondence with the three-dimensional coordinate sets of the points on the object. Finally, the position calculation unit 112 outputs the position information including the calculated three-dimensional coordinate sets.

The process performed by the position calculation unit 112 in step S402 is described in detail below. Let Ia and Ib be camera images captured by the cameras 101 a and 101 b, respectively. The position calculation unit 112 calculates a pixel coordinate pair Q_(an) of the point in the camera image Ia and a pixel coordinate pair Q_(bn) of the point in the camera image Ib, both of which correspond to a point Pn on the object, on the basis of, for example, the similarity between the images, the luminance constraint (described below), and the smoothness constraint. That is, a pair of corresponding pixel coordinate pairs (Q_(an), Q_(bn)) is calculated. The pair of pixel coordinate pairs (Q_(an), Q_(bn)) is a pair of the coordinate pairs of pixels that are included in the two camera images, respectively, and that correspond to each other. Note that when a point included in the camera image Ia and a point included in the camera image Ib correspond to each other, the pair of corresponding points may be defined as a pair of the pixel coordinate pair of the point included in the camera image Ia and the pixel coordinate pair of the point included in the camera image Ib.

For example, the position calculation unit 112 obtains the pixel coordinate pair (u_(an), v_(an)) of the nth pixel among the pixels included in the camera image Ia. In addition, the position calculation unit 112 estimates the corresponding point in the camera image Ib and calculates a pixel coordinate pair (u_(bn), v_(bn)) of the corresponding point. The image of an object in the camera image Ia is represented at the pixel coordinate pair (uan, van) and the image of the object in the camera image Ib is represented at the pixel coordinate pair (ubn, vbn).

When two cameras take pictures of the same object and obtains two camera images, that is, images of the same point on the object are included in one camera image and the other camera image, and the one of the images of the same point is shown at a point in the one camera image and the other of the images of the same point is shown at a point in the other camera image, a pair of the points in the two camera images is referred to as a “pair of corresponding points in two camera images”. According to the present embodiment, a pair of corresponding points is expressed by using a pair of pixel coordinate pairs. For example, when the pair of camera images is the images Ia and Ib, the pixel coordinate pair (u_(bn), v_(bn)) in the camera image Ib, which correspond to the pixel coordinate pair (u_(an), v_(an)) in the camera image Ia, is calculated. The calculation of a pair of pixel coordinate pairs is performed for all the pixels included in the camera image Ia.

When the pixel coordinate pair (u_(an), v_(an)) in the camera image Ia and the pixel coordinate pair (u_(bn), v_(bn)) in the camera image Ib are the pixel coordinate pairs of two corresponding points included in the pair of corresponding points, a pixel value Ia(u_(an), v_(an)) and a pixel value Ib(u_(bn), v_(bn)) at the two pixel coordinate pairs are the same. This constraint condition is called luminance constraint. In addition, since one given object occupies adjacent pixels in a camera image, it is highly likely that a point included in the camera image Ib that corresponds to a point identified by the pixel adjacent to the pixel coordinate pair (u_(an), v_(an)) of the camera image Ia is located close to a point identified by the pixel coordinate pair (u_(bn), v_(bn)) of the camera image Ib. This constraint condition is called smoothness constraint. The pair of corresponding points in the camera images Ia and Ib can be obtained by calculating a set of pairs including the pixel coordinate pair (u_(an), v_(an)) and the pixel coordinate pair (u_(bn), v_(bn)) that best satisfy the two conditions described above, that is, the luminance constraint and smoothness constraint.

A corresponding point search method or a motion estimation method for calculating the pair of pixel coordinate pairs of a pair of corresponding points with real number precision is described in detail in, for example, NPL 2 mentioned above. Since the method is well-known, a detailed description is not given here.

Subsequently, for each of the pairs of corresponding points, the position calculation unit 112 calculates a three dimensional coordinate set (x_(an), y_(an), z_(an)) of a point on the object corresponding to the pair of corresponding points by simultaneously solving Equations (1) and (3) for the two cameras 101 a and 101 b by using the pair of pixel coordinate pairs [(u_(an), v_(an)), (u_(bn), v_(bn))] of the pair of corresponding points in the camera images Ia and Ib, a prepared camera parameter set C_(a) of the camera 101 a, and a prepared camera parameter set C_(b) of the camera 101 b. In this example, the three-dimensional coordinate set is expressed by the coordinate values of the camera coordinate system of the camera 101 a.

Note that the binocular stereo method for calculating the three-dimensional coordinate set of a point on an object corresponding to a pair of corresponding points by using the pair of corresponding points and the camera parameter sets of two cameras is not limited to the above-described technique. A technique other than the above-described technique can be used. One of other binocular stereo methods is described in detail in aforementioned NPL 3. Since the technique is well-known, a detailed description of the method is not given here.

For simplicity of description, let T be a function used in the following Equation (8), and let F be a function used in the following Equation (9): (u _(an) ,v _(an) ,u _(bn) ,v _(bn))=T(I _(a) ,I _(b))  (8) (x _(an) ,y _(an) ,z _(an))=F(u _(an) ,v _(an) ,u _(bn) ,v _(bn) ,C _(a) ,C _(b))  (9). The function T is a process to calculate, from the camera images Ia and Ib, the pixel coordinate pair (u_(an), v_(an)) and the pixel coordinate pair (u_(bn), v_(bn)) of the corresponding points included in a pair. The function F is a process to calculate the three-dimensional coordinate set of a point on an object corresponding to the pair of corresponding points by using the pixel coordinate pairs (u_(an), v_(an)) and (u_(bn), v_(bn)) of the corresponding points included in the pair and the camera parameter sets C_(a) and C_(b) of the cameras 101 a and 101 b and by using Equations (1) to (3).

Let p_(a,b,n) denote nth position information that collectively describes the pair of pixel coordinate pairs of the pair of nth corresponding points in the camera images Ia and Ib and the three-dimensional coordinate set of the point on the object corresponding to the pair of corresponding points, and let P_(a,b) denote a set of N pieces of position information p_(a,b,n) (n=1, . . . , N). Then, P_(a,b) is given as follows:

$\begin{matrix} \begin{matrix} {{P_{a,b} = \left\{ p_{a,b,n} \right\}},\left( {n = {1\mspace{14mu}\ldots\mspace{14mu} N}} \right)} \\ {= {\left\{ \left( {u_{an},v_{an},u_{bn},v_{bn},x_{an},y_{an},z_{an}} \right) \right\}.}} \end{matrix} & (10) \end{matrix}$

The position information p_(a,b,n) includes the pixel coordinate pair (u_(an), v_(an)) of the corresponding point included in the camera image Ia, the pixel coordinate pair (u_(bn), v_(bn)) of the corresponding point included in the camera image Ib, and the three-dimensional coordinate set (x_(an), y_(an), z_(an)) corresponding to the pair of corresponding points. Note that the pair including pixel coordinate pair (u_(an), v_(an)) and pixel coordinate pair (u_(bn), v_(bn)) corresponds to a pair of corresponding points including the corresponding point included in the camera image Ia and identified by the pixel coordinate pair (u_(an), v_(an)) and the corresponding point included in the camera image Ib and identified by the pixel coordinate pair (u_(bn), v_(bn)). The number N may be the same as the number of pixels of the camera images Ia and Ib or may be smaller than the number of pixels of the camera images Ia and Ib.

As described above, the position calculation unit 112 calculates pairs of corresponding points, calculates the three-dimensional coordinate sets of points on an object corresponding to the pairs of corresponding points, and outputs the position information P_(a,b) including pairs each including the pixel coordinate pairs of the pair of corresponding points and the three-dimensional coordinate set of the point on the object corresponding to the pair of corresponding points. In this manner, for example, as illustrated in FIGS. 8A and 8B, a distance image can be obtained in which a distance from the camera is represented in the form of a grayscale image. Note that FIG. 8A illustrates an example of a camera image, and FIG. 8B illustrates an example of a distance image of the camera image. In the distance image, the distance from the camera to a target point is represented by the luminance of the pixel.

Finally, in step S403, the image generation unit 113 obtains a camera image (for example, a camera image Ia), which is one of the camera images Ia and Ib, and the position information {P_(a,b)} including pairs each including the pixel coordinate pairs of a pair of corresponding points and the three-dimensional coordinate set of a point on the object corresponding to the pair of corresponding points. In addition, the image generation unit 113 detects a three-dimensional object, such as an obstacle represented by corresponding points in the camera image Ia. Thereafter, for example, as illustrated in FIG. 9, the image generation unit 113 superimposes a frame indicating an area of interest over the camera image at a position corresponding to the position of the detected three-dimensional object and outputs the composite image. FIG. 9 is a schematic illustration of an example of the composite image output from the image generation unit 113 according to the embodiment.

According to the present embodiment, to detect a three-dimensional object, such as an obstacle, from the position information by using the image generation unit 113, points each having a distance from the camera 101 less than a predetermined distance dth and having a height higher than the ground are extracted from among the three-dimensional coordinate sets included in the position information. The extracted points are considered as the three-dimensional object. More specifically, by using the three-dimensional coordinate set (x_(an), y_(an), z_(an)) included in the nth position information p_(a,b,n) in the position set P_(a,b), the image generation unit 113 calculates a distance d_(n) between the three-dimensional coordinate set (x_(an), y_(an), z_(an)) and the camera 101 a and the three-dimensional coordinate set (x_(wn), y_(wn), z_(wn)) of the world coordinate system corresponding to the three-dimensional coordinate set (x_(an), y_(an), z_(an)). Thereafter, if the distance d_(n) is smaller than the predetermined distance dth (d_(n)<dth) and the height of the three-dimensional coordinate set of the world coordinate system is higher than the ground (z_(wn)>0), the image generation unit 113 extracts, as a point on the three-dimensional object, the point located in the three-dimensional space and identified by the three-dimensional coordinate set (x_(an), y_(an), z_(an)) included in the nth position information p_(a,b,n). In addition, the image generation unit 113 extracts a set of projection points obtained by projecting, over the camera image Ia, three-dimensional coordinate values included in pieces of position information detected as points on a three-dimensional object. Thereafter, the image generation unit 113 superimposes a frame, such as a rectangular frame, that circumscribes the set of projection points over the camera image Ia to generate a composite image. Subsequently, the image generation unit 113 outputs the composite image to display the composite image on the display 120.

As described above, the image processing unit 110 generates the image of the three-dimensional object and the position information regarding the three-dimensional object from the two camera images captured by the image capturing unit 100 through the processing in steps S401 to S403 performed by the computer 300 and outputs the generated image and position information. In addition, the image capturing unit 100 and the computer 300 may repeat the above-described processing.

FIG. 9 illustrates an example of a composite image generated through the process in step S403. For example, in the example illustrated in FIG. 9, a frame is displayed around each of obstacles (a pedestrian and a parked vehicle) located close to the camera mounted in the rear portion of the vehicle body in order to draw driver's attention to the obstacles. Accordingly, a driver can easily notice the obstacles which are likely to collide with the vehicle. In addition, since in particular, the compound eye camera system 10 includes the cameras each using a fisheye lens, the compound eye camera system 10 can obtain a camera image of 180 degrees and the three-dimensional coordinate sets corresponding to the camera image.

As described above, the image capturing unit 100 of the compound eye camera system 10 and the image processing unit 110 configured by the computer 300 operate to calculate the three-dimensional coordinate sets of points on the object corresponding to points included in the camera image by using the camera images captured by two cameras. In addition, the image processing unit 110 can detect a three-dimensional object in the field of view of the camera (e.g., an obstacle) on the basis of a pair including pixel coordinate pairs of a pair of corresponding points and a three-dimensional coordinate set of a point on the object corresponding to the pair of corresponding points. Thereafter, the image processing unit 110 can display the three-dimensional object. As a result, the driver of the automobile including the compound eye camera system 10 can easily notice the three-dimensional object, such as an obstacle located in the vicinity of the automobile.

1-2-2. Self-Calibration Operation

The compound eye camera system 10 described above calculates the three-dimensional coordinate sets of the object by using the camera parameter set recorded in advance. The camera parameter set may vary due to deformation caused by aged deterioration, an external force, or a temperature change. In such a case, calibration of the camera is needed. The operation performed by the compound eye camera system 10 during self-calibration is described below with reference to FIGS. 10 and 11. FIG. 10 is a functional configuration diagram illustrating the detailed configuration of the camera parameter set calculation apparatus 111 of the compound eye camera system 10 illustrated in FIG. 2. FIG. 11 is a flowchart illustrating an example of self-calibration process S111 performed by the image processing unit 110 of the compound eye camera system 10 according to the first embodiment. The self-calibration process S111 is the process performed by the image processing unit 110 during the self-calibration operation.

As illustrated in FIG. 10, the camera parameter set calculation apparatus 111 that performs self-calibration process S111 includes an acquisition unit 901, a corresponding point calculation unit 902, an evaluation value calculation unit 903, a camera parameter determination unit 904, and a camera parameter output unit 905. The constituent elements constituted by the acquisition unit 901, the corresponding point calculation unit 902, the evaluation value calculation unit 903, the camera parameter determination unit 904, and the camera parameter output unit 905 may have the same configuration as the constituent elements of the image processing unit 110.

The acquisition unit 901 acquires, from the image capturing unit 100, the camera images Ia and Ib captured by the cameras 101 a and 101 b, respectively. The acquisition unit 901 may acquire the camera images Ia and Ib stored in a storage device (not illustrated) of the image capturing unit 100 or the image processing unit 110. An example of the storage device is a memory, such as a semiconductor memory. Each of the camera images Ia and Ib includes the same object used as a reference for calibration. In addition, the acquisition unit 901 acquires, from the camera parameter storage unit 114, an initial camera parameter set including the camera parameters currently set in the cameras 101 a and 101 b.

The corresponding point calculation unit 902 estimates and extracts, from the camera images Ia and Ib, pairs of points that correspond to each other, that is, pairs of corresponding points and calculates the pixel coordinate pairs of the corresponding points in each of the camera images Ia and Ib.

The evaluation value calculation unit 903 calculates the three-dimensional coordinate set of a point on the object corresponding to one of the pairs of corresponding points by using the above-described stereoscopic range finding technique based on the pixel coordinate pairs of the corresponding points and the initial camera parameter set. Hereinafter, a point on the object corresponding to a pair of corresponding points is also referred to as a “ranging point”. In addition, the evaluation value calculation unit 903 calculates the evaluation value of the camera parameter set on the basis of the pixel values of the points obtained by projecting the three-dimensional coordinate set of the ranging point onto the camera images Ia and Ib. Hereinafter, the points on the two camera images obtained by projecting the three-dimensional coordinate set of the ranging point onto the two camera images are referred to as “projection points”. When a ranging point P is obtained on the basis of the camera image Ia obtained when the camera 101 a captures the image of an object and the camera image Ib obtained when the camera 101 b captures the image of the object, the projection point obtained by projecting the ranging point P onto the camera image Ia may be referred to as a “first projection point”, and the projection point obtained by projecting the same ranging point P onto the camera image Ib may be referred to as a “second projection point”.

The camera parameter determination unit 904 determines whether to change the camera parameter sets currently set in the cameras 101 a and 101 b on the basis of the evaluation values calculated by the evaluation value calculation unit 903. The camera parameter determination unit 904 changes, that is, updates the camera parameter set based on the result of determination. In this way, the camera parameter determination unit 904 determines the camera parameter set. The camera parameter output unit 905 acquires the camera parameter sets determined by the camera parameter determination unit 904 and outputs the camera parameter sets to the camera parameter storage unit 114 or the like.

As illustrated in FIG. 11, the camera parameter set calculation apparatus 111 performs self-calibration process S111 including the processes in steps S1001 to S1008 so as to calibrate the camera parameter sets, that is, the initial camera parameter sets set for the cameras 101 a and 101 b. In self-calibration process S111, the camera parameter set calculation apparatus 111 automatically performs the calibration process. If a calibration instruction is input to the compound eye camera system 10 by the user via an input device (not illustrated) such as a switch, a touch pad, or a keyboard, the camera parameter set calculation apparatus 111 starts the self-calibration process for the cameras 101 a and 101 b. For example, if the user detects the abnormality of the camera 101 a or 101 b, the user may input a calibration instruction. Alternatively, a calibration instruction may be input before factory shipment after completion of manufacture of the cameras 101 a and 101 b. Still alternatively, the camera parameter set calculation apparatus 111 may automatically start the self-calibration process at a predetermined point in time.

After self-calibration process S111 performed by the camera parameter set calculation apparatus 111 is started, the acquisition unit 901 acquires the camera images Ia and Ib captured by the cameras 101 a and 101 b, respectively, in step S1001. In addition, in step S1002, the acquisition unit 901 reads the initial camera parameter sets Ca0 and Cb0 of the cameras 101 a and 101 b stored beforehand in the camera parameter storage unit 114. As used herein, the term “beforehand” may be referred to as “before the camera parameter set calculation apparatus 111 starts the self-calibration process”.

In step S1003, the corresponding point calculation unit 902 uses the acquired camera images Ia and Ib output from the cameras 101 a and 101 b, respectively, and estimates pairs of corresponding points in the camera images Ia and Ib by using the corresponding point search technique that is the same as that in step S402 illustrated in FIG. 5. In addition, the corresponding point calculation unit 902 calculates and outputs the pixel coordinate pair (u_(an), v_(an)) of a corresponding point Pan included in the camera image Ia and the pixel coordinate pair (u_(bn), v_(bn)) of a corresponding point Pbn included in the camera image Ib. Note that n is a value in the range of 1 to N, and the nth pair of corresponding points includes the corresponding point Pan and the corresponding point Pbn.

Note that steps S1004 to S1007 are repeated in accordance with the result of determination made in step S1006. The camera parameter set of each of the cameras 101 a and 101 b is updated each time the steps S1004 to S1007 are repeated. Accordingly, let C_(ar) and C_(br) denote the camera parameter sets of the cameras 101 a and 101 b at the rth iteration, respectively. Then, for the initial camera parameter set, r=0.

In step S1004, by using the pixel coordinate pairs of the corresponding points included in the N pairs of corresponding points and the camera parameter sets C_(ar) and C_(br) of the cameras 101 a and 101 b, the evaluation value calculation unit 903 calculates and outputs three-dimensional coordinate sets (x_(ar1), v_(ar1), z_(ar1)) . . . (x_(arn), y_(arn), z_(arn)) of points corresponding to the N pairs of corresponding points by using the following equation based on the stereoscopic range finding technique: (x _(arn) ,y _(arn) ,z _(arn))=F(u _(an) ,v _(an) ,u _(bn) ,v _(bn) ,C _(ar) ,C _(br))r=0 . . . R,n=1 . . . N  (11). That is, the evaluation value calculation unit 903 calculates the three-dimensional coordinate sets of the N ranging points.

Furthermore, in step S1005, the evaluation value calculation unit 903 projects each of the ranging points onto the camera images Ia and Ib output from the cameras 101 a and 101 b, respectively, by using the three-dimensional coordinate sets of the N ranging points and the camera parameter sets C_(ar) and C_(br) of the cameras 101 a and 101 b, respectively. Thereafter, for each of the ranging points, the evaluation value calculation unit 903 calculates the first projection point obtained by projecting the ranging point onto the camera image Ia and the second projection point obtained by projecting the ranging point onto the camera image Ib. The projection point on the camera image Ia is the first projection point, and the projection point on the camera image Ib is the second projection point. Projecting a ranging point onto the camera image Ia means transforming the three-dimensional coordinate set of the ranging point into the pixel coordinate pair in the camera image Ia by the evaluation value calculation unit 903 using the following equation: (u _(arn) ,v _(arn))=G(x _(arn) ,y _(arn) ,z _(arn) ,C _(ar)) r=0 . . . R, n=1 . . . N  (12). Projecting a ranging point onto the camera image Ib means transforming the three-dimensional coordinate set of the ranging point into the pixel coordinate pair in the camera image Ib by the evaluation value calculation unit 903 using the following equation: (u _(brn) ,v _(brn))=H(x _(arn) ,y _(arn) ,z _(arn) ,C _(ar) ,C _(br)) r=0 . . . R, n=1 . . . N  (13). Thus, for each of the ranging points, the evaluation value calculation unit 903 calculates the pixel coordinate pair (u_(arn), y_(arn)) obtained by projecting the ranging point onto the camera image Ia and the pixel coordinate pair (u_(arn), y_(arn)) obtained by projecting the same ranging point onto the camera image Ib. Function G in Equation (12) represents coordinate transformation from the three-dimensional coordinate set of a ranging point into the pixel coordinate pair in the camera image Ia on the basis of the above-described Equations (1) to (3) and Equation (5). Function H in Equation (13) represents coordinate transformation from the three-dimensional coordinate set of the ranging point into the pixel coordinate pair in the camera image Ib on the basis of the above-described Equations (1) to (3) and Equation (5).

Furthermore, the evaluation value calculation unit 903 calculates the pixel value iar of the first projection point obtained by projecting the ranging point onto the camera image Ia and the pixel value ibr of the second projection point obtained by projecting the same ranging point onto the camera image Ib by using the camera images Ia and Ib and the camera parameter sets C_(ar) and C_(br). For example, let (u_(arn), v_(arn)) denote the pixel coordinate pair of the first projection point, and let (u_(brn), v_(brn)) denote the pixel coordinate pair of the second projection point. Then, the pixel value iar of the first projection point is expressed by I_(a)(u_(arn), v_(arn)), and the pixel value ibr of the second projection point is expressed as I_(b)(u_(brn), v_(brn)) Note that for each of the ranging points, the evaluation value calculation unit 903 calculates the coordinate values of the projection point obtained by projecting the ranging point onto the camera image Ia and the coordinate values of the projection point obtained by projecting the same ranging point onto the camera image Ib. Thereafter, the evaluation value calculation unit 903 calculates an evaluation value J defined by the sum of the absolute values of the differences by using the following evaluation function:

$\begin{matrix} {{J = {\frac{1}{N}{\sum\limits_{n = 1}^{N}{{{I_{a}\left( {u_{arn},v_{arn}} \right)} - {I_{b}\left( {u_{brn},v_{brn}} \right)}}}}}},} & (14) \end{matrix}$ where N is the number of the ranging points. Each of the differences is a difference between the pixel value iar of the projection point in the camera image Ia and the pixel value ibr of the projection point in the camera image Ib.

In addition, according to the present embodiment, the pixel value is the luminance value of a pixel. The pixel coordinate pair has a real number precision. The pixel value at the pixel coordinate pair is calculated by bicubic interpolation. Note that the pixel value is not limited to the luminance value, and the RGB value may be used as the pixel value, instead of the luminance value. Furthermore, the method for calculating the pixel value for the pixel coordinate pair having real number precision is not limited to bicubic interpolation, and another interpolation method, such as bilinear interpolation, may be used. In addition, when calculating the sum of the absolute values of the differences between the pixel value of the projection point in the camera image Ia and the pixel value of the projection point in the camera image Ib corresponding to each of the N ranging points used in the calculation of the evaluation value J, the absolute value of the difference between the pixel values may be weighted. For example, the weight of a point group in which the color of the object continuously varies may be increased, or the weight of a point group in which the irregularity of the surface of the object is large may be decreased. These weightings are effective for smoothing a change in evaluation value J with respect to a continuous change of the camera parameters and, thus, facilitating to minimize the evaluation value J.

Subsequently, in step S1006, the camera parameter determination unit 904 determines whether a condition for ending the updating of the camera parameter sets C_(ar) and C_(br) of the cameras 101 a and 101 b, respectively, is satisfied. If the ending condition is not satisfied (NO in step S1006), the processing performed by the camera parameter determination unit 904 proceeds to step S1007, where the camera parameter sets C_(ar) and C_(br) are changed. However, if the ending condition is satisfied (YES in step S1006), the camera parameter determination unit 904 ends the updating of the camera parameter set. Thereafter, the camera parameter determination unit 904 determines the updated (the most recent) camera parameter sets C_(ar) and C_(br) as the camera parameter sets of the cameras 101 a and 101 b, respectively, and outputs the camera parameter sets. Thereafter, the processing proceeds to step S1008. Note that the ending condition is at least one of the following three conditions: (a) searching of a camera parameter within a given search range has been completed; (b) the evaluation value J is less than a first threshold value; and (c) the loop count r of the processing in steps S1004 to S1007 is greater than a second threshold value.

In step S1007, the camera parameter determination unit 904 changes (that is, updates) the (r+1)th camera parameter set. More specifically, the camera parameter determination unit 904 changes the camera parameter sets C_(ar) and C_(br) of the cameras 101 a and 101 b within a given range and calculates new camera parameter sets C_(ar+1) and C_(br+1). The camera parameter determination unit 904 outputs the camera parameter sets C_(ar+1) and C_(br+1). Thereafter, the processing proceeds to step S1004. As a result, the (r+1)th process of a series of iterative processes (steps S1004 to S1007) is performed. Note that the search range of each of the camera parameters may be a predetermined range of the camera parameter. For example, the search range of each of the camera parameter may be a range of ±5% of the initial camera parameter.

In step S1008, the camera parameter output unit 905 acquires pairs including the camera parameter set calculated through the above-described iterative processing of step S1004 to step S1007 and the evaluation value J corresponding to the camera parameter set. The evaluation value J corresponding to the camera parameter set is an evaluation value calculated using the camera parameter set. The camera parameter output unit 905 selects, from among the pairs including a camera parameter set and an evaluation value J, the one having the smallest evaluation value J. In addition, if the evaluation value J corresponding to the selected camera parameter set is smaller than the evaluation value J corresponding to the initial camera parameter set, the camera parameter output unit 905 replaces the initial camera parameter set stored in the camera parameter storage unit 114 with the selected camera parameter set. In this way, the camera parameter set is updated to the optimum camera parameter set. Furthermore, the above-described operations in steps S1002 to S1008 can be expressed by the following equations:

$\begin{matrix} {\left. \begin{matrix} {{\arg\;{\min\limits_{{Car},\;{Cbr}}(J)}} = {\underset{{Car},\;{Cbr}}{\arg\;\min}\;\frac{1}{N}{\sum\limits_{n = 1}^{N}{{{I_{a}\left( {u_{arn},v_{arn}} \right)} - {I_{b}\left( {u_{brn},v_{brn}} \right)}}}}}} \\ {{\left( {u_{arn},v_{arn}} \right) = {{{G\left( {x_{arn},y_{arn},z_{arn},C_{ar}} \right)}\mspace{31mu} r} = {0\mspace{14mu}\ldots\mspace{14mu} R}}},{n = {1\mspace{14mu}\ldots\mspace{14mu} N}}} \\ {{\left( {u_{brn},v_{brn}} \right) = {{{H\left( {x_{arn},y_{arn},z_{arn},{C_{{ar},}C_{br}}} \right)}\mspace{31mu} r} = {0\mspace{14mu}\ldots\mspace{14mu} R}}},{n = {1\mspace{14mu}\ldots\mspace{14mu} N}}} \\ {\left( {x_{arn},y_{arn},z_{arn}} \right) = {F\left( {u_{an},v_{an},u_{bn},v_{bn},C_{ar},C_{br}} \right)}} \\ {\left( {u_{an},v_{an},u_{bn},v_{bn}} \right) = {T\left( {I_{a},I_{b}} \right)}} \end{matrix} \right\}.} & (15) \end{matrix}$ Note that the processes in steps S1001 to S1008 may be performed by the computer 300 illustrated in FIG. 4.

As described above, the camera parameter set calculation apparatus 111 calculates, from the camera images output from the cameras 101 a and 101 b, the three-dimensional coordinate set of a ranging point corresponding to each of pairs of corresponding points through self-calibration process S111 based on the stereoscopic range finding technique. In addition, the camera parameter set calculation apparatus 111 calculates the pixel coordinate pair of the first projection point obtained by projecting the ranging point onto the camera image Ia and the pixel coordinate pair of the second projection point obtained by projecting the same ranging point onto the camera image Ib. Thereafter, the camera parameter set calculation apparatus 111 calculates the evaluation value on the basis of the difference between the pixel value of the first projection point and the pixel value of the second projection point. By calculating the camera parameter sets C_(ar) and C_(br) of the cameras 101 a and 101 b that minimize the evaluation value, the camera parameter set calculation apparatus 111 can obtain camera parameter sets with the correct solution values or with small errors from the correct solution values.

1-3. Verification of Effect of Self-Calibration Process

Hereinafter, from the results of experiments based on simulation, it is verified that the above-described self-calibration process S111 performed by the camera parameter set calculation apparatus 111 can accurately calculate the camera parameters of the cameras 101 a and 101 b. The verification is described below.

To calculate the camera parameters having a reduced error from the correct solution values of the camera parameters by using the evaluation function for the evaluation value J defined by Equation (14), the evaluation function defined by Equation (14) needs to satisfy the following two conditions:

(i) The evaluation value J is minimized when the camera parameter is the correct solution value.

(ii) The evaluation function forms a linear shape that is convex downward near the correct solution value of the camera parameter.

The results of experiments described below indicate that the evaluation function defined by Equation (14) satisfies the above-described two conditions (i) and (ii). The experiments were carried out by using the camera images illustrated in FIGS. 12A and 12B as input camera images captured by the cameras 101 a and 101 b.

Experiment Condition 1

Under Experimental Condition 1, an experiment was conducted in which the evaluation value was calculated while changing one of the camera parameters of the cameras and, thereafter, the result of calculation of the evaluation value was compared with the known correct solution value of the camera parameter. The internal parameter set in each of the camera parameter sets of the cameras 101 a and 101 b includes the following five parameters in accordance with the equidistant projection model defined by the above-described equation (4): the pixel coordinate pair (cu, cv) of the center of the optical axis of the camera, the focal length f of the camera, and the lengths dpx and dpy in the x and y directions of one pixel of the image device of the camera. The external parameter set M is given by the following Equation (16) which is similar to Equations (1) and (2) described above:

$\begin{matrix} {\left. \begin{matrix} {\begin{pmatrix} x_{e} \\ y_{e} \\ z_{e} \\ 1 \end{pmatrix} = {M\begin{pmatrix} x_{w} \\ y_{w} \\ z_{w} \\ 1 \end{pmatrix}}} \\ \begin{matrix} {M = \begin{pmatrix} r_{00} & r_{01} & r_{02} & t_{X} \\ r_{10} & r_{11} & r_{12} & t_{Y} \\ r_{20} & r_{21} & r_{22} & t_{Z} \\ 0 & 0 & 0 & 1 \end{pmatrix}} \\ {= {\begin{pmatrix} 1 & 0 & 0 & T_{X} \\ 0 & 1 & 0 & T_{Y} \\ 0 & 0 & 1 & T_{Z} \\ 0 & 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} {\cos\; R_{Z}} & {{- \sin}\; R_{Z}} & 0 & 0 \\ {\sin\; R_{Z}} & {\cos\; R_{Z}} & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}}} \\ {\begin{pmatrix} {\cos\; R_{Y}} & 0 & {\sin\; R_{Y}} & 0 \\ 0 & 1 & 0 & 0 \\ {{- \sin}\; R_{Y}} & 0 & {\cos\; R_{Y}} & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & {\cos\; R_{X}} & {{- \sin}\; R_{X}} & 0 \\ 0 & {\sin\; R_{X}} & {\cos\; R_{X}} & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}} \end{matrix} \end{matrix} \right\}.} & (16) \end{matrix}$ The external parameter set M includes, as particular amounts of displacement of the camera coordinate system with respect to the world coordinate system, the following six parameters: the amounts of rotation R_(X), R_(Y), and R_(Z) about the X, Y, and Z axes, respectively, and the amounts of translation T_(X), T_(Y) and T_(Z) of X, Y, and Z in the X-, Y-, and Z-axis directions, respectively. The camera parameter sets of the two cameras 101 a and 101 b include 22 parameters in total. Note that the X, Y and Z axes are the reference axes of the world coordinate system.

Since dpx and f, and dpy and f cannot be uniquely obtained due to the scale uncertainty, dpy is set to the design value (a constant value). In addition, when camera images output from two cameras mounted as illustrated in FIG. 7A are used, the amount of translation T_(X) in the baseline length direction (for example, the X-axis direction) in the camera parameters of the two cameras cannot be uniquely obtained due to the scale uncertainty. Thus, T_(X) is set to be the design value (a constant value). As a result, the evaluation value J is a function having the following nine camera parameters as variables for each of the cameras: cu, cv, f, dpx, R_(X), R_(Y), R_(Z), T_(Y), and T_(Z).

The images used in the experiment are illustrated in FIGS. 12A and 12B. FIGS. 12A and 12B illustrate examples of camera images of scenes in a parking lot. The images are generated by computer graphics (CG). The images illustrated in FIGS. 12A and 12B are the camera images of the cameras 101 a and 101 b, respectively. In this experiment, instead of calculating the pair of points, one of which is included in the camera image of FIG. 12A and the other of which is included the camera image of FIG. 12B and which corresponds to each other, that is, a pair of corresponding points, by using the corresponding point calculation unit 902, the known correct solution value of the pair of corresponding points was used.

After setting all of the camera parameters of the cameras 101 a and 101 b to design values that are the correct solution values by using the correct solution values of the pair of corresponding points as an input value, the evaluation value J was calculated by changing only one of the camera parameters of the camera 101 b.

Experimental Result 1

Experimental Result 1 under the above-described experimental condition 1 is described below. More specifically, for nine camera parameters, the evaluation values in the vicinity of the correct solution value were obtained as illustrated in FIGS. 13A to 15B. In FIGS. 13A to 15B, the abscissa represents the value of one of the camera parameters, and the ordinate represents the evaluation value J. The camera parameter that was changed is cu in FIG. 13A, cv in FIG. 13B, fin FIG. 13C, dpx in FIG. 13D, R_(X) in FIG. 14A, R_(Y) in FIG. 14B, R_(Z) in FIG. 14C, T_(Y) in FIG. 15A, and T_(Z) in FIG. 15B.

In addition, the correct solution values for the camera parameters are 640 pixels for cu, 480 pixels for cv, 1.12 mm for f, 2.75 μm for dpx, 0° for R_(X), 0° for Ry, 0° for R_(Z), 0 mm for T_(Y), and 0 mm for T_(Z). In each of FIGS. 13A to 15B, the correct solution value of the camera parameter appears in the middle of the abscissa.

As can be seen from each of FIGS. 13A to 15B, the evaluation function draws a downwardly convex linear shape in the vicinity of the correct solution value of the camera parameter (in the middle of the abscissa), and the camera parameter that minimizes the evaluation value is the same as the correct solution value. As a result, the camera parameters that minimize the evaluation values J can be calculated within the range of the camera parameters illustrated in FIGS. 13A to 15B. That is, camera calibration according to the technique is available.

For example, with reference to FIG. 13A, in the cu range of 634 to 646 pixels, the evaluation values are calculated while increasing or decreasing cu at regular or random intervals. In addition, the camera parameter cu that provides the smallest evaluation value or the camera parameter cu that provides a sufficiently small evaluation value among the calculated evaluation values is selected as the optimum value. The camera parameter cu selected in this manner is a camera parameter having the correct solution value or a small error from the correct solution value.

As can be seen from the example of the experiment under Experimental Condition 1, the evaluation function defined by Equation (14) satisfies the above-described two conditions (i) and (ii) in the vicinity of the correct solution value.

Experimental Condition 2

Under Experimental Condition 2, an experiment was carried out to calculate the camera parameters so as to reduce an error by performing self-calibration process S111 by using the camera parameter set calculation apparatus 111 of the present disclosure, and the calculation results were verified.

In this experiment, the two camera images illustrated in FIGS. 12A and 12B were input to the camera parameter set calculation apparatus 111. In addition, like Experimental Condition 1, a known correct solution value was used as the pair of corresponding points in the two camera images. After all of the camera parameters of the cameras 101 a and 101 b were set to design values, which are correct solution values, random noise within a predetermined range was added to the nine camera parameters of the camera 101 b. The camera parameters having the noise added thereto were used as the initial camera parameters. Evaluation values were calculated while changing only one of the nine parameters of the camera 101 b within the predetermined range, and the camera parameter that provided the smallest one of the calculated evaluation values was selected as the optimum value. This process was sequentially repeated for the nine parameters as one test. Thereafter, tests were performed.

Experimental Result 2

Experimental Result 2 of the experiment carried out under Experimental Condition 2 is described below. More specifically, an example of Experimental Result 2 was obtained as illustrated in FIGS. 16A and 16B. In FIG. 16A, the abscissa represents the number of tests, and the ordinate represents the evaluation value J in Equation (14). That is, in FIG. 16A, the evaluation value calculated by using the camera parameters obtained by performing the test the number of times indicated by the value on the abscissa is indicated by the value on the ordinate. In FIG. 16B, the abscissa represents the number of tests, and the ordinate represents the RMS value of the reprojection error. The term “reprojection error” refers to the level at which the calculated camera parameters satisfy Equations (1) and (3). More specifically, when the correct solution value of the pair including the three-dimensional coordinate set on the object appearing in the camera image Ib of the camera 101 b and the pixel coordinate pairs on the object are known, the pixel coordinate pair obtained by projecting the three-dimensional coordinate set of the correct solution onto the camera image Ib is calculated by using the calculated camera parameters of the camera 101 b. The difference between the calculated pixel coordinate pair and the pixel coordinate pair of the correct solution is referred to as a “reprojection error”. In other words, as the reprojection error decreases, the camera parameter has a smaller error from the correct solution value so as to satisfy Equation (1) and (3). In both FIGS. 16A and 16B, the evaluation value decreases with increasing number of tests. Thus, the difference between the pixel values at the projection points in the two camera images decreases. At the same time, the reprojection error decreases with increasing number of tests.

As described above, through self-calibration process S111 performed by the camera parameter set calculation apparatus 111 according to the present disclosure, camera parameters that well satisfy Equation (1) and (3) and that have a small error from the correct solution value can be calculated.

As described above, the camera parameters that minimize the evaluation value J in Equation (14) and that are obtained through self-calibration process S111 are camera parameters having the correct solution value or a small error if at least the evaluation function for the evaluation value J satisfies the above-described two conditions (i) and (ii). That is, the following effect is provided: “The correct camera parameter sets of the cameras 101 a and 101 b can be calculated, and the camera parameter sets can be updated to the correct ones by using two camera images output from the cameras 101 a and 101 b and the initial camera parameter sets of the cameras 101 a and 101 b through the processes in step S1001 to S1008 performed by the camera parameter set calculation apparatus 111”.

According to an existing calibration technique, since reference points each having a known correspondence between the three-dimensional coordinate set and the pixel coordinate pair are used, equipment or the like having a calibration index is needed. In contrast, according to the present embodiment, the camera parameter set calculation apparatus 111 extracts a pair of corresponding points by using the camera images captured by two cameras and calculates the three-dimensional coordinate set of a point on the object corresponding to the extracted pair of corresponding point. In addition, the camera parameter set calculation apparatus 111 calculates the projection points of the corresponding points included in the pair in the camera images of the two cameras by using the three-dimensional coordinate set. If the camera parameters are correct, the pixel values of the projection points in the two camera images are the same. As the error in the camera parameter increases, the difference between the pixel values of the projection points of the two camera images increases. Accordingly, the camera parameter set calculation apparatus 111 calculates an optimum camera parameter (that is, a correct camera parameter) by calculating a camera parameter that minimizes the difference between the pixel values of the projection points in the two camera images. In this manner, the camera parameter set calculation apparatus 111 provides an effect of enabling calibration of a camera even when there is no reference point having a known correspondence between the three-dimensional coordinate set and the pixel coordinate pair, that is, without using equipment having the calibration index or the like.

Second Embodiment

According to the second embodiment, unlike the first embodiment, a camera parameter set calculation apparatus 211 of a compound eye camera system 20 includes a three-dimensional point group calculation unit 906 instead of the corresponding point calculation unit 902 of the first embodiment. The difference between the compound eye camera system 20 according to the second embodiment and the compound eye camera system of the first embodiment is mainly described below.

FIG. 17 is a schematic illustration of the functional configuration of the camera parameter set calculation apparatus 211 of the image processing unit 210 in the compound eye camera system 20 according to the second embodiment. The image processing unit 210 includes the camera parameter set calculation apparatus 211, a position calculation unit 112, an image generation unit 113, and a camera parameter storage unit 114. The camera parameter set calculation apparatus 211 includes an acquisition unit 901, a three-dimensional point group calculation unit 906, an evaluation value calculation unit 903, a camera parameter determination unit 904, and a camera parameter output unit 905.

The three-dimensional point group calculation unit 906 calculates the three-dimensional coordinate sets of points indicating a predetermined region in the camera image captured by one of the cameras 101 a and 101 b. That is, the three-dimensional point group calculation unit 906 calculates and outputs a three-dimensional point group indicating the predetermined region. The predetermined region is a region having assumed information about the position relative to the cameras 101 a and 101 b. An area corresponding to the predetermined region in the three-dimensional space may be stationary. More specifically, the area corresponding to the predetermined region in the three-dimensional space may be a stationary area sufficiently distant from the cameras 101 a and 101 b. For example, the area corresponding to the predetermined region in the three-dimensional space may be a sky region. The area corresponding to the predetermined region in the three-dimensional space may be a stationary area having the position relative to the cameras 101 a and 101 b that can be set by assumption instead of the actual measurement value. For example, the area corresponding to the predetermined region in the three-dimensional space may be a region of an object that forms a plane in three-dimensional space, such as a road surface, the ground, a ceiling surface of a structure, or a wall surface of a structure. The three-dimensional point group calculation unit 906 can determine whether a pixel of the camera image is included in the predetermined region on the basis of, for example, the luminance or texture of the pixel. In addition, the three-dimensional point group calculation unit 906 can determine whether the predetermined region is a sky region, a road surface area, a ground area, a ceiling surface area of a structure, or a wall surface area of a structure in the captured image, that is, the type of the predetermined region on the basis of the luminance or texture of the pixel. Note that the predetermined region is an example of a predetermined portion. The predetermined region may be a point, a portion having an area of about one pixel or a portion having an area of pixels. In a given camera image, a predetermined region having assumed three-dimensional position information set therefor is also referred to as a “predetermined portion” of the image. Similarly, in a given camera image, a region other than the predetermined region is also referred to as a “non-predetermined portion” of the image.

The flow of the operation performed by the compound eye camera system 20 during self-calibration according to the second embodiment is described below with reference to FIGS. 17 to 19. FIG. 18 is a flowchart illustrating an example of the flow of the operation performed by the image processing unit 210 according to the second embodiment during self-calibration. FIG. 19 is a flowchart illustrating an example of details of the process flow in step S2003, which is the process of calculating the three-dimensional point group in FIG. 18. Self-calibration process S211 in FIG. 18 is the process performed by the image processing unit 210 during the self-calibration operation.

For example, in self-calibration process S111 according to the first embodiment, in steps S1003 and S1004, the pixel coordinate pair (uan, van) of one corresponding point and the pixel coordinate pair (ubn, vbn) of the other corresponding point in each of N pairs of corresponding points in the two camera images of the cameras 101 a and 101 b are calculated. In addition, the three-dimensional coordinate set (x_(arn), y_(arn), z_(arn)) of the ranging point is calculated by using the pixel coordinate pairs of the corresponding points included in each of the pairs of corresponding points and the camera parameter sets Car and Cbr of the cameras 101 a and 101 b. However, according to self-calibration process S211 of the second embodiment, instead of calculating the three-dimensional coordinate set corresponding to the pair of the corresponding points by using the estimated pair of corresponding points in the two camera images, an area having assumed position information is used. For example, an area having assumed position information set therefor is one of the areas described above as the predetermined regions.

As illustrated in FIG. 18, self-calibration process S211 includes the processes of steps S1001 and 1002 and steps S1005 to S1008 as in self-calibration process S111. Self-calibration process S211 further includes step S2003 that calculates a three-dimensional point group. The process of step S2003 is performed between step S1002 and step S1005. In addition, in self-calibration process S211, the process of step S2003 is performed after the process of step S1007. In order to update the camera parameters, the processes of steps S1004 to S1007 are repeated in self-calibration process S111. In contrast, in self-calibration process S211, the processes of step S2003 and steps S1005 to S1007 are repeated.

More specifically, in steps S1001 and S1002 of self-calibration process S211, the acquisition unit 901 of the camera parameter set calculation apparatus 211 acquires the camera images Ia and Ib captured by the cameras 101 a and 101 b, respectively, and initial camera parameter sets Ca0 and Cb0 of the cameras 101 a and 101 b, respectively. The camera images Ia and Ib are obtained by capturing the image of the same object. Subsequently, in step S2003, the three-dimensional point group calculation unit 906 of the camera parameter set calculation apparatus 211 calculates and outputs a three-dimensional point group indicating a predetermined region in the camera image captured by one of the cameras 101 a and 101 b. Thereafter, the camera parameter set calculation apparatus 211 performs the processes in steps S1005 to S1008.

The process performed in step S2003 of self-calibration process S211 is described in detail below with reference to FIG. 19. The following description is given with reference to the operation for calculating the three-dimensional coordinate set corresponding to each of the pixels of the camera image Ia captured by the camera 101 a and outputting the three-dimensional point group. Note that the operation for calculating the three-dimensional coordinate set corresponding to each of the pixels of the camera image Ib captured by the camera 101 b and outputting the three-dimensional point group is the same as the operation for calculating the three-dimensional coordinate set corresponding to each of the pixels of the camera image Ia and outputting the three-dimensional point group.

In step S2101, the three-dimensional point group calculation unit 906 reads the camera images Ia and Ib of the cameras 101 a and 101 b acquired in step S1001 and the camera parameter sets Car and Cbr of the cameras 101 a and 101 b first. The camera parameter sets Car and Cbr are camera parameter sets obtained when the rth iteration of steps S1003 to S1006 in FIG. 18 is performed. The initial camera parameter sets acquired in step S1002 are the camera parameter sets Ca0 and Cb0.

The three-dimensional point group calculation unit 906 performs the processes in the subsequent steps S2102 to S2106 for the mth pixel of the camera image Ia. The three-dimensional point group calculation unit 906 sequentially performs the processes in steps S2102 to S2106 for all of M pixels included in the camera image Ia and, thus, calculates M three-dimensional coordinate sets.

In step S2102, the three-dimensional point group calculation unit 906 determines whether the mth pixel of the camera image Ia is a pixel corresponding to a predetermined region by using a pattern recognition technique. The above-described predetermined region of the image (e.g., a sky region or a load surface region of the captured image) can be extracted by using a widely used technique including a pattern recognition technique. For example, NPL 4 describes such an extraction technique. The detailed description is not given herein. Thereafter, the three-dimensional point group calculation unit 906 determines whether each of all the M pixels corresponds to a predetermined region. The three-dimensional point group calculation unit 906 performs the process in step S2105 for the pixels corresponding to the predetermined region (YES in step S2102). However, the three-dimensional point group calculation unit 906 performs the processes in steps S2103 and S2014 for the pixels not corresponding to the predetermined region (NO in step S2102).

FIG. 20 illustrates an example of a result of determination as to whether each of the pixels of the camera image Ia of the camera 101 a corresponds to a predetermined region in step S2102. FIG. 20 illustrates an example of a predetermined region P extracted by the camera parameter set calculation apparatus 211 according to the second embodiment. FIG. 20(A) illustrates the camera image Ia captured by the camera 101 a, and FIG. 20(B) illustrates a pixel region corresponding to a predetermined region in the camera image Ia. From the camera image Ia, a sky region S hatched with oblique lines and an asphalt road surface region G hatched with vertical lines are extracted as the pixel areas for the predetermined region. Hereinafter, for simplicity of description, the sky region S and the road surface region G may be collectively referred to as a “predetermined region P”.

The three-dimensional point group calculation unit 906 calculates the three-dimensional coordinate set for each of the pixels determined as the predetermined region P by the process of step S2105. The three-dimensional point group calculation unit 906 calculates the three-dimensional coordinate sets of the pixels not determined as the predetermined region P through the processes of steps S2103 and S2104. Hereinafter, a pixel determined to be a pixel in the predetermined region P is referred to as an “intra-region pixel”, and a pixel not determined as the predetermined region P is referred to as an “extra-region pixel”. If the predetermined region P is not included in the camera image, all the pixels are extra-region pixels.

In step S2103, the three-dimensional point group calculation unit 906 defines, as a first corresponding point, an extra-region pixel of the camera image Ia not determined as a pixel of the predetermined region P and estimates a second corresponding point in the camera image Ib corresponding to the first corresponding point by using the corresponding point searching technique that is the same as in step S1003 according to the first embodiment. That is, the three-dimensional point group calculation unit 906 estimates a pair including an “extra-region pixel in the camera image Ia” and a “pixel located in the camera image Ib and corresponding to the extra-region pixel in the camera image Ia”. Thereafter, for each of the corresponding points at the locations of the extra-region pixels, the three-dimensional point group calculation unit 906 calculates the pixel coordinate pairs (uam_(q), vam_(q)) and (ubm_(q), vbm_(q)) in the images Ia and Ib. That is, a pair of pixel coordinate pairs including the pixel coordinate pair (uam_(q), vam_(q)) and the pixel coordinate pair (ubm_(q), vbm_(q)) of the extra-region pixel is calculated. The pixel coordinate pair (uam_(q), vam_(q)) represents the pixel coordinate pair of the m_(q)th extra-region pixel among the extra-region pixels of the camera image Ia.

In step S2104, the three-dimensional point group calculation unit 906 calculates the three-dimensional coordinate set (xarm_(q), yarm_(q), zarm_(q)) corresponding to a pair of pixel coordinate pairs [(uam_(q), vam_(q)), (ubm_(q), vbm_(q))] including the pixel coordinate pair of the extra-region pixel by using the above-described equation (11) together with the pair of pixel coordinate pairs [(uam_(q), vam_(q)), (ubm_(q), vbm_(q))] including the pixel coordinate pair of the extra-region pixel and the camera parameter sets Car and Cbr of the cameras 101 a and 101 b. That is, the processes in steps S2103 and S2014 are the same as the processes in steps S1003 and S1004 according to the first embodiment.

In step S2105, the three-dimensional point group calculation unit 906 calculates the three-dimensional coordinate set (xarm_(p), yarm_(p), zarm_(p)) for each of the intra-region pixels determined as the predetermined region P. The three-dimensional coordinate set (xarm_(p), yarm_(p), zarm_(p)) represents the three-dimensional coordinate set of the m_(p)th intra-region pixel among the intra-region pixels of the camera image Ia. The three-dimensional point group calculation unit 906 calculates the three-dimensional coordinate sets of all of the intra-region pixels within the predetermined region P. For example, for the intra-region pixels of the sky region S, the three-dimensional coordinate sets are calculated on the assumption that the distance between the sky and the camera 101 a is sufficiently large. In contrast, for intra-region pixels of the road surface region G, the three-dimensional coordinate sets are calculated on the assumption that the object of the intra-region pixels, that is, the road surface is located in a predetermined plane in the three-dimensional space.

The three-dimensional coordinate set of the intra-region pixel of the sky region S can be calculated by using the above-described equations (1) to (3) when the pixel coordinate pair of the intra-region pixel of the camera image Ia is (uam_(p), vam_(p)) and the camera parameter set of the camera 101 a is Car and if the height position ze of the sky in the camera coordinate system is set to an extremely large value (e.g., ze=10000 m). The three-dimensional coordinate set of the intra-region pixel of the road surface region G can be calculated by using the above-described equations (1) to (3) when the pixel coordinate pair of the in-region pixel of the camera image Ia is (uam_(p), vam_(p)) and the camera parameter set of the camera 101 a is Car and if the height position zw of the substantially horizontal road surface in the world coordinate system is set to a predetermined position (e.g., zw=0 m). The height position ze of the sky region S and the height position zw of the road surface region G assumed as described above are an example of the assumed three-dimensional position information of the predetermined region P. Note that as the assumed three-dimensional position information, various kinds of position information may be employed as described below.

When the three-dimensional coordinate sets of the sky region S are calculated on the assumption that the distance between the sky and the camera is sufficiently large, ze=10000 (m) is employed as an example of the distance between the sky and the camera. However, the distance between the sky and the camera is not limited thereto. Any value that is sufficiently larger than the distance between the camera 101 a and the camera 101 b can be employed. In addition, the distance between the sky and the camera is not restricted by the sky height position ze. The distance between the sky and the camera may be set by using the sky horizontal position xe or ye in the camera coordinate system or by using at least one of sky horizontal positions xe, ye, and ze. For example, the distance between the sky and the camera may be |xe, ye, ze|=10000 (m), that is, the distance between a point (xe, ye, ze) in the sky and the camera may be set to 10000 (m).

In step S2106 subsequent to steps S2104 and S2105, the three-dimensional point group calculation unit 906 determines whether calculation of three-dimensional coordinate sets of all the pixels of the camera image Ia has been completed. If the calculation of the three-dimensional coordinate sets of all the pixels has been completed (YES in step S2106), the processing performed by the three-dimensional point group calculation unit 906 proceeds to step S2107. However, if a pixel that is not subjected to calculation of the three-dimensional coordinate set is present (NO in step S2106), the processing performed by the three-dimensional point group calculation unit 906 proceeds to step S2102, where the three-dimensional point group calculation unit 906 performs the processes in steps S2102 to S2105 on the pixel that is not subjected to calculation of the three-dimensional coordinate set. Thereafter, the three-dimensional point group calculation unit 906 repeats the processes in steps S2102 to S2106 until the three-dimensional coordinate sets of all the pixels are calculated.

In step S2107, the three-dimensional point group calculation unit 906 outputs the three-dimensional coordinate sets of all of the pixels of the camera image Ia, that is, M calculated three-dimensional coordinate sets (xarm, yarm, zarm). Note that (xarm, yarm, zarm) includes (xarm_(p), yarm_(p), zarm_(p)) and (xarm_(q), yarm_(q), zarm_(q)).

As described above, the three-dimensional point group calculation unit 906 calculates the three-dimensional coordinate sets of the M points in the predetermined region P and the region other than the predetermined region P, that is, the three-dimensional coordinate sets (xarm, yarm, zarm) of the ranging points through the processes in steps S2101 to S2107 included in step S2003.

As illustrated in FIG. 18, in step S1005 subsequent to step S2003, by using the three-dimensional coordinate sets of the M ranging points, the camera parameter set Car of the cameras 101 a, and the camera parameter set Cbr of the cameras 101 b, the evaluation value calculation unit 903 of the camera parameter set calculation apparatus 211 calculates a projection point obtained by projecting each of the ranging points onto each of the camera images Ia and Ib. The evaluation value calculation unit 903 calculates the pixel value Ia(uamr, varm) at the projection point (uarm, varm) in the camera image Ia and the pixel value Ib(ubrm, vbrm) at the projection point (ubrm, vbrn) in the camera image Ib. Thereafter, the evaluation value calculation unit 903 calculates an evaluation value J representing the difference between the pixel value Ia(uarm, varm) and the pixel value Ib(ubrm, vbrm).

In the processing after step S1006, the camera parameter set calculation apparatus 211 obtains the camera parameter sets Car and Cbr that minimize the evaluation value J on the basis of the evaluation value J in the same manner as in the first embodiment. By obtaining such camera parameter sets Car and Cbr, the correct camera parameter sets of the cameras 101 a and 101 b can be obtained. That is, the cameras 101 a and 101 b can be calibrated.

As described above, like the self-calibration operation in the first embodiment, in the self-calibration process of the cameras 101 a and 101 b of the compound eye camera system 20 according to the second embodiment, association of a point having a known three-dimensional coordinate set (for example, the reference point on a calibration index) with the pixel coordinate pair of the known point in the camera image is not needed. Thus, equipment having a calibration index or the like is not advantageously needed.

In addition, according to the second embodiment, the self-calibration operation is performed by the compound eye camera system 20 under the assumption that as the distance between the camera and the region in the three-dimensional space corresponding to the predetermined region, the distance between the camera and the sky, which is a region of the three-dimensional space corresponding to one of regions included in the predetermined region, is used and the sky is sufficiently distant from the camera and the assumption that the region of the road surface, which is one of the predetermined regions, is on the plane of zw=0. These assumptions do not change even when time passes, an external force is applied, or a temperature change occurs. As in the self-calibration operation of the first embodiment, the compound eye camera system 20 having such a configuration does not use a particular object having a known three-dimensional coordinate set (e.g., a calibration index) during self-calibration. As a result, even when time passes, an external force is applied, or a temperature change occurs so that the three-dimensional coordinate sets of a particular object change, the camera can be correctly calibrated.

According to the first embodiment, to obtain the three-dimensional coordinate set (xarn, yarn, zarn) for each of the pairs of corresponding points during the self-calibration operation, the compound eye camera system 10 calculates the pixel coordinate pair (uan, van) of one corresponding point and the pixel coordinate pair (ubn, vbn) of the other corresponding point in the pair of corresponding points in the cameras images captured by the cameras 101 a and 101 b by using a corresponding point search technique. The pixel coordinate pairs of the corresponding points determined by the corresponding point search technique may have an error. As a result, the three-dimensional coordinate set (xarn, yarn, zarn) corresponding to the pair of corresponding points calculated by using the pixel coordinate pairs of the corresponding points may also have an error.

In contrast, according to the second embodiment, the compound eye camera system 20 uses the predetermined region P (e.g., the sky region S and the road surface region G) for which an assumed distance to the camera can be set during the self-calibration operation and calculates the three-dimensional coordinate sets for the points of the predetermined region P on the basis of the assumed distance from the camera to the predetermined region P. The three-dimensional coordinate sets of the predetermined region P calculated on the basis of such assumption can be expected to reduce an error, as compared with the three-dimensional coordinate sets calculated by using the corresponding point search technique according to the first embodiment. As a result, the self-calibration operation performed by the compound eye camera system 20 has an advantage in that an error in the calculated camera parameter is smaller than that in the self-calibration operation according to the first embodiment. That is, the calibration accuracy is higher than that in the self-calibration operation according to the first embodiment.

In self-calibration process S211, the three-dimensional point group calculation unit 906 of the compound eye camera system 20 determines the predetermined region P and the region other than the predetermined region P and calculates the three-dimensional coordinate sets of each of the regions. However, the three-dimensional point group calculation unit 906 may calculate the three-dimensional coordinate sets of only one of the two regions and calculate the camera parameter sets on the basis of the calculated three-dimensional coordinate sets. Alternatively, when the predetermined region P includes regions having different distances from the camera, such as the sky region S and the road surface region G, the three-dimensional point group calculation unit 906 may calculate the three-dimensional coordinate sets of at least one of the regions. Thereafter, the three-dimensional point group calculation unit 906 may calculate the camera parameter sets on the basis of the three-dimensional coordinate sets of the at least one region. Alternatively, the three-dimensional point group calculation unit 906 may further calculate the three-dimensional coordinate sets of a region other than the predetermined region P and calculate the camera parameter sets on the basis of the three-dimensional coordinate sets of the region other than the predetermined region P and the three-dimensional coordinate sets of the at least one region of the predetermined region P.

Furthermore, while the present embodiment has been described with reference to the sky region S and the road surface region G as the predetermined region P, the predetermined region P is not limited thereto. An object forming a plane other than the road surface in the three-dimensional space may be used as the predetermined region P. For example, a ceiling surface, a wall surface, or the like of a structure may be used as the predetermined region P.

If a ceiling surface of a structure is used as the predetermined region P, the three-dimensional point group calculation unit 906 of the compound eye camera system 20 determines the region of the ceiling surface of a structure, such as an indoor parking lot or a tunnel, in the camera image. Thereafter, the three-dimensional point group calculation unit 906 may assume that the three-dimensional positions of the pixels of the ceiling surface region are located on the substantially horizontal plane of the height position zw=h (m) (h is the height of the ceiling) in the world coordinate system and calculate the three-dimensional coordinate sets of the pixels of the ceiling surface region. If a wall surface of a structure is used as the predetermined region P, the three-dimensional point group calculation unit 906 determines the region of the wall surface of the structure, such as a particular parking lot, in the camera image. Thereafter, the three-dimensional point group calculation unit 906 may assume that the three-dimensional positions of the pixels of the wall surface region are located in a substantially vertical plane of the horizontal direction position yw=d (m) (d is the horizontal distance from the camera to the wall surface) in the world coordinate system and calculate the three-dimensional coordinate sets of the pixels of the wall surface region.

Furthermore, the compound eye camera system 20 may pre-store, in a memory or the like (not illustrated) of the image processing unit 210, information about a structure having a ceiling surface or a wall surface corresponding to the predetermined region P and the position information of the structure and the position information of the ceiling surface and the wall surface of the structure. The image processing unit 210 may determine whether a ceiling surface or a wall surface corresponding to the predetermined region P is present in the camera image on the basis of the above-described position information. Alternatively, the image processing unit 210 may determine whether a ceiling surface or a wall surface corresponding to the predetermined region P is present in the camera image on the basis of the position information received from a car navigation system of the automobile having the compound eye camera system 20 mounted therein. The car navigation system acquires the three-dimensional position of the automobile, such as the latitude, the longitude, and the altitude, via a global positioning system (GPS) range finder. Alternatively, the compound eye camera system 20 may acquire the above-described information about the ceiling surface and the wall surface from the outside of the automobile having the compound eye camera system 20 mounted therein via communication, such as wireless communication. The compound eye camera system 20 enables calculation of a camera parameter sets with less error by using the position information of a plane corresponding to the predetermined region P in accordance with the location of the compound eye camera system 20.

Furthermore, if the predetermined region P includes at least two of the sky region S, the road surface region G, the ceiling surface region, the wall surface region, and the like, the three-dimensional point group calculation unit 906 of the compound eye camera system 20 may determine which region is used to calculate the three-dimensional coordinate sets on the basis of the reliability levels (that is, the accuracy) of the regions in calculating the three-dimensional coordinate sets from the pixel coordinate pairs of the intra-region pixels of each of the regions. For example, the three-dimensional point group calculation unit 906 may select a region having a reliability level higher than or equal to a predetermined value. The reliability level may be based on, for example, the degree of coincidence between the three-dimensional position information assumed for each region and the actual position information of the region. For example, when a change in the height or inclination of the plane represented by the region frequently occurs, the reliability level may be low.

2-4-1. Modification 1 of Self-Calibration Operation

In the camera parameter set calculation apparatuses according to the first and second embodiments, the input from the user is used as a trigger for starting the self-calibration processes S111 and S211. However, the trigger is not limited thereto. The camera parameter set calculation apparatus may automatically start self-calibration processes S111 and S211 by another trigger. For example, the camera parameter set calculation apparatus may automatically start the self-calibration using, as a trigger, the input from a sensor, such as a temperature sensor, an impact sensor, or a timer.

For example, FIG. 21 is a block diagram of the configuration of a compound eye camera system 30 having a sensor unit 130 according to Modification 1. In addition to the configuration of the compound eye camera system 20 according to the second embodiment, the compound eye camera system 30 includes the sensor unit 130. The sensor unit 130 includes a temperature sensor 131, an impact sensor 132, and a timer 133. In addition to the configuration of the camera parameter set calculation apparatus 211 of the second embodiment, a camera parameter set calculation apparatus 311 of an image processing unit 310 of the compound eye camera system 30 has a sensor information acquisition unit 907 that acquires detection information from the sensor unit 130 and outputs a start command to start the self-calibration process.

The camera parameter set calculation apparatus 311 according to the present modification may perform the self-calibration process once immediately after the compound eye camera system 30 is powered on. Note that instead of the above-described operation performed after power-on, the camera parameter set calculation apparatus 311 may perform the self-calibration process on the basis of an input from the timer 133 of the sensor unit 130, an input from the impact sensor 132 of the sensor unit 130, or an input from the temperature sensor 131 of the sensor unit 130. The operation triggered by an input from the timer 133 may be performed at regular time intervals detected by the timer 133. The operation triggered by the impact sensor 132 may be performed when the impact sensor 132 detects a strong impact force applied to an automobile having the compound eye camera system 30 mounted therein due to, for example, a traffic accident. The impact sensor 132 may be constituted by an acceleration sensor. The operation triggered by an input from the temperature sensor 131 may be performed when the temperature sensor 131 detects that the temperature around the compound eye camera system 30 has reached a predetermined temperature. Note that the compound eye camera system 10 according to the first embodiment may be configured to include the sensor unit 130, and the camera parameter set calculation apparatus 111 of the compound eye camera system 10 may be configured to include the sensor information acquisition unit 907.

2-4-2. Modification 2 of Self-Calibration Operation

In the self-calibration process, the camera parameter set calculation apparatuses according to the first and second embodiments calculate the evaluation value J by using all the ranging points having the three-dimensional coordinate sets calculated on the basis of the camera images Ia and Ib. However, all the ranging points need not be used to calculate the evaluation value J.

According to the present modification, the camera parameter set calculation apparatus removes, from among the three-dimensional coordinate sets of the ranging points, the ones of the ranging points each having no luminance gradient or a sufficiently small luminance gradient. In this manner, the camera parameter set calculation apparatus reduces the number of ranging points used to calculate the evaluation value J and, thus, reduces the amount of calculation in calculation of the evaluation value J.

The self-calibration process performed by the camera parameter set calculation apparatus according to the present modification is the same as that according to the first or second embodiment except for the operation in step S1005. Accordingly, only the operation in step S1005 according to the present modification is described below, and descriptions of the other operations are not repeated.

In step S1005, the evaluation value calculation unit 903 of the camera parameter set calculation apparatus calculates the pixel coordinate pair of a projection point obtained by projecting each of the ranging points onto each of the camera images Ia and Ib of the cameras 101 a and 101 b, respectively, by using the above-described equations (12) and (13) together with the three-dimensional coordinate set of the ranging point and the camera parameter sets Car and Cbr of the cameras 101 a and 101 b.

Thereafter, if Ka ranging points are present, the evaluation value calculation unit 903 removes, from the ranging points, the ones each having a pixel value of zero or sufficient small luminance gradient at the pixel coordinate pair (uar, var) of the projection point obtained by projecting the ranging point onto the camera image Ia. If the number of the removed ranging points is Kb (Kb≥0), the evaluation value calculation unit 903 selects the three-dimensional coordinate sets of (Ka-Kb) ranging points.

If the luminance gradients of the pixel values around the pixel coordinate pair (u_(ar), v_(ar)) corresponding to the three-dimensional coordinate set (x_(ar), y_(ar), z_(ar)) of the ranging point are 0, the pixel value Ia(u_(ar), v_(ar)) at the pixel coordinate pair does not change even when the camera parameter is slightly changed and, thus, the pixel coordinate pair (u_(ar), v_(ar)) corresponding to the ranging point is slightly changed. That is, the evaluation value J does not change. As a result, even when such a ranging point is removed, the evaluation value J is not influenced by the removal. In addition, since the number of ranging points is reduced, an effect of reducing the amount of computation performed in step S1005 is provided.

Note that to reduce the number of ranging points used to calculate the evaluation value J in step S1005, another technique may be used. For example, from the ranging points, the ranging point that does not appear in one of the images captured by the two cameras 101 a and 101 b may be removed. In this case, the pixel coordinate pairs of the projection points in the camera images Ia and Ib corresponding to the three-dimensional coordinate set of the ranging point may be calculated. If one of the pixel coordinate pairs of the two projection points is located in an invisible region of the camera image, the ranging point may be removed from the calculation of the evaluation value J.

When the same ranging point appears in the two camera images Ia and Ib, the above-described equation (14) indicates that the difference between the pixel value of the projection point obtained by projecting the ranging point onto the camera image Ia and the pixel value of the projection point obtained by projecting the same ranging point onto the camera image Ib is 0. However, when one of the first projection point obtained by projecting the ranging point onto the camera image Ia and the second projection point obtained by projecting the same ranging point onto the camera image Ib is in an occlusion region of the cameras 101 a and an occlusion region of the cameras 101 b, the above-described equation (14) indicates that even when the ranging point is within the image capturing range, it is likely that the ranging point does not appear in the camera image because it is hidden by another object, that is, it is likely that the first projection point and the second projection point do not represent the same ranging point and, thus, the ranging point and the projection points have an error. In terms of such first and second projection points, even when the camera parameters are correct, the difference between the pixel values of the first projection point and the second projection point is not 0 and, thus, the evaluation value has an error. Accordingly, to reduce the number of ranging points used to calculate the evaluation value J in step S1005, from among the ranging points, the one having the projection point which does not appear in at least one of the camera images, that is, the ranging point located in an occlusion region of the camera may be removed from the calculation of the evaluation value. In this manner, an effect of reducing an error in the evaluation value can be provided. It may be determined whether the projection point of a ranging point is in an occlusion region of the camera on the basis of the above-mentioned occlusion information that defines the range of the three-dimensional space outside the image capturing range of the camera.

Note that in step S1006 of the self-calibration process performed by the camera parameter set calculation apparatuses according to the first and second embodiments, the end of iterative calculation is determined on the basis of whether the evaluation value J is smaller than the first threshold value and whether the process loop count r is greater than the second threshold value. However, the iterative calculation end condition is not limited thereto. For example, another end condition may be added. For example, the end condition may be that the evaluation value J does not change even if the camera parameter set is changed.

Note that in the self-calibration process performed by the camera parameter set calculation apparatus, if the evaluation function of the evaluation value J satisfies the above-described two conditions, the camera parameter having a small evaluation value J, that is, the camera parameter having a small difference from the correct solution value (i.e., a small error) can be obtained, and the camera parameter can be updated. However, if the evaluation function does not satisfy the above-described two conditions, the camera parameter having a small error is not obtained at all times. For example, if the image capturing range of the camera is extremely dark and, thus, all the pixel values are 0 or if the object has a uniform color and, thus, has no texture, the evaluation value J in the above-described equation (14) remains unchanged and has a constant value (for example, 0) even when the camera parameters are changed. If, in the self-calibration process, the camera parameter set calculation apparatus acquires such a camera image, the iterative process does not end until the loop count r of the process reaches the second threshold value or greater. At this time, the evaluation value remains unchanged and is not updated. In this case, although the camera parameters are not updated, a calculation load is imposed on the processing. By ending the iterative process when the evaluation value does not change even if the camera parameter is changed, an effect of reducing the calculation load can be provided.

3. Variation of Evaluation Function

In the self-calibration process according to the embodiments and the modifications, to calculate the evaluation value J used in the self-calibration process performed by the camera parameter set calculation apparatus, an evaluation function based on the sum of the absolute values of the differences between pixel values corresponding to ranging points is used, as indicated by the above-described equation (14). However, the evaluation function is not limited thereto. Any function based on the differences between the pixel values in two camera images corresponding to the ranging points may be used. For example, the evaluation function may be an evaluation function that uses the sum of the squared differences between two pixel values in two camera images corresponding to each of ranging points. More specifically, in another function, the squared difference between the pixel value at the projection point obtained by projecting a ranging point onto the camera image Ia and the pixel value at the projection point obtained by projecting the same ranging point onto the camera image Ib is obtained for each of the ranging points, and the obtained values are summed. Such a function is given as follows:

$\begin{matrix} {J = {\frac{1}{N}{\sum\limits_{k = 1}^{N}{\left\{ {{I_{a}\left( {u_{arn},v_{arn}} \right)} - {I_{b}\left( {u_{brn},v_{brn}} \right)}} \right\}^{2}.}}}} & (17) \end{matrix}$

The camera parameter calculated on the basis of the evaluation value defined by the sum of the absolute values of the differences between pixel values as indicated by Equation (14) is close to the true value when the distribution of the differences between the pixel values is the Laplacian distribution. That is, an effect of obtaining a small error from the true value can be provided.

In contrast, the camera parameters calculated on the basis of the evaluation value defined by the sum of squared differences between pixel values as indicated by Equation (17) is close to the true value when the distribution of the pixel value error is the Gaussian distribution. That is, an effect of obtaining a small error from the true value can be provided.

Others

While the camera parameter set calculation apparatus according to one or more aspects of the present disclosure has been described with reference to, for example, the embodiments, the present disclosure is not limited to the embodiments. Various modifications of the present embodiment that those skilled in the art conceive and an embodiment formed by combining the constituent elements of different embodiments without departing from the spirit of the present disclosure may be encompassed within the scope of one or more aspects of the present disclosure.

While the above embodiments and the modifications have been described with reference to the image capturing unit 100 that is configured with two cameras 101 a and 101 b, the number of cameras is not limited to two. To perform self-calibration according to the present disclosure, the image capturing unit 100 only needs to include at least two cameras, and any number of cameras more than or equal to two may be used. In addition, the cameras may be integrated into one body or may be separately disposed.

According to the embodiments and the modifications, the image capturing unit, the image processing unit, and the display of the compound eye camera system are all mounted in an automobile. In addition, the camera parameter set calculation apparatus constituting the image processing unit is mounted in the automobile. However, the configuration is not limited thereto. For example, the image capturing unit, the image processing unit, and the display may be mounted in any moving body other than an automobile. The moving body may be a vehicle other than an automobile, a ship, a flight vehicle, or the like. The vehicle other than an automobile may be a truck, a bus, a motorcycle, a transport vehicle, a railroad vehicle, a construction machine, a cargo handling machine or the like. The flight vehicle may be an aircraft, a drone or the like.

In addition, the camera parameter set calculation apparatus may be constituted by a computer installed at a different location and connected to the automobile via a network. The camera parameter self-calibration process performed by the camera parameter set calculation apparatus requires a large calculation load. As a result, by performing the self-calibration process using a high-performance computer, such as a server, instead of using a computer mounted in the automobile and having a limited performance, an effect of reduction of the calculation time and acquisition of the parameters of a higher accuracy is provided.

Furthermore, as described above, the technique of the present disclosure may be implemented as a system, an apparatus, a method, an integrated circuit, a computer program, a computer-readable recording medium, such as a recording disk, or any selective combination thereof. Examples of the computer-readable recording medium include, but not limited to, a nonvolatile recording medium, such as a CD-ROM.

For example, each of the constituent elements included in the compound eye camera system according to the above-described embodiment is typically provided in the form of an LSI (Large Scale Integration) which is an integrated circuit. The constituent elements may be individually formed as one chip or may be integrated into one chip so as to include some or all of them.

In addition, the circuit integration is not limited to LSI and may be achieved by dedicated circuitry or a general-purpose processor. Alternatively, a field programmable gate array (FPGA), which is programmable after fabrication of the LSI, or a reconfigurable processor which allows reconfiguration of connections and settings of circuit cells in LSI may be used.

In the above-described embodiment, each of the constituent elements may be configured by dedicated hardware or may be provided by executing a software program suitable for the constituent element. Each of the constituent elements may be provided by a program execution unit, such as a CPU or a processor, which reads and executes a software program recorded on a recording medium, such as a hard disk or a semiconductor memory.

In addition, some or all of the constituent elements may be formed from a removable integrated circuit (IC) card or a removable single module. The IC card or the module is a computer system formed from, for example, a microprocessor, a ROM, and a RAM. The IC card or the module may include the above-described LSI or system LSI. When the microprocessor operates in accordance with the computer program, the IC card or the module provides its function. The IC card or the module may be tamper resistant.

The camera parameter set calculation method according to the present disclosure may be achieved by a circuit, such as a micro processing unit (MPU), a CPU, a processor, and an LSI, and an IC card or a single module.

Furthermore, the technique according to the present disclosure may be achieved by a digital signal composed of a software program or a software program or may be a non-transitory computer readable recording medium having a program stored therein. It will be appreciated that the above-mentioned program can be distributed via a transmission medium, such as the Internet.

In addition, the numerical values used above, such as the ordinal numbers and the quantities, are only illustrative examples for describing the technique of the present disclosure, and the present disclosure is not limited to the numerical values given. In addition, the connection relation between the constituent elements is only an illustrative example for describing the technique of the present disclosure, and the connection relation for achieving the functions of the present disclosure is not limited thereto.

Furthermore, the division into functional blocks described in the block diagrams is only illustrative, and the functional blocks may be integrated into one functional block, and a single functional block may be divided into functional blocks. In addition, some of the functions may be transferred to another functional block. Still furthermore, the functions of functional blocks having similar functions may be performed by a single hardware configuration or software in parallel or in a time-division multiplexing manner.

The camera parameter calculation apparatus according to the present disclosure is useful for calculating the camera parameters of at least two cameras. 

What is claimed is:
 1. A camera parameter set calculation method comprising: (a1) acquiring a first image captured by a first camera and a second image captured by a second camera; (a2) acquiring a first camera parameter set including one or more camera parameters of the first camera and a second camera parameter set including one or more camera parameters of the second camera; (a3) extracting, from the first image, a predetermined portion of an object having three-dimensional position information; (a4) calculating three-dimensional coordinate sets corresponding to the predetermined portion on a basis of the three-dimensional position information, the first image, and the first camera parameter set; (a5) determining first pixel coordinate pairs of the predetermined portion of the first image on a basis of the three-dimensional coordinate sets corresponding to the predetermined portion and the first camera parameter set and determining second pixel coordinate pairs in the second image corresponding to the predetermined portion on a basis of the three-dimensional coordinate sets and the second camera parameter set; (a6) calculating an evaluation value on a basis of pixel values at the first pixel coordinate pairs in the first image and pixel values at the second coordinate pairs in the second image; (a7) updating the first camera parameter set and the second camera parameter set on a basis of the evaluation value; and (a8) outputting the updated first camera parameter set and second camera parameter set, wherein at least one of processes (a1) to (a8) is performed by a processor.
 2. The camera parameter set calculation method according to claim 1, further comprising: (b1) extracting, from the first image, a non-predetermined portion representing a portion of the first image other than the predetermined portion; (b2) calculating a three-dimensional coordinate set on an object included in the non-predetermined portion on a basis of the first image, the second image, the first camera parameter set, and the second camera parameter set; and (b3) determining a first target pixel coordinate pair of a point obtained by projecting the three-dimensional coordinate set onto the first image on the basis of the first camera parameter set and determining a second target pixel coordinate pair of a point obtained by projecting the three-dimensional coordinate set onto the second image on the basis of the second camera parameter set, wherein in process (a6), the evaluation value is calculated on a basis of a relationship between the pixel value at the first pixel coordinate pair in the first image and the pixel value at the second pixel coordinate pair in the second image and a relationship between pixel value at the first target pixel coordinate pair in the first image and pixel value at the second target pixel coordinate pair in the second image, and wherein at least one of processes (a1) to (a8) and (b1) to (b4) is performed by a processor.
 3. The camera parameter set calculation method according to claim 2, wherein process (b2) includes estimating a pair of corresponding points in the non-predetermined portion and the second image, and wherein the three-dimensional coordinate set corresponds to the pair of corresponding points.
 4. The camera parameter set calculation method according to claim 1, wherein in process (a6), differences between the pixel values at the first pixel coordinate pairs in the first image and the pixel values at the second coordinate pairs in the second images are used to calculate the evaluation value.
 5. The camera parameter set calculation method according to claim 4, wherein in process (a3), a second predetermined portion that differs from the predetermined portion is extracted from the first image, and the second predetermined portion has second three-dimensional position information that differs from the three-dimensional position information, wherein in process (a4), second three-dimensional coordinate sets corresponding to the second predetermined portion are calculated on a basis of the second three-dimensional position information, the first image, and the first camera parameter set, wherein in process (a5), third pixel coordinate pairs of the second predetermined portion in the first image are determined on a basis of the second three-dimensional coordinate sets and the first camera parameter set, and fourth pixel coordinate pairs corresponding to the second predetermined portion in the second image are determined on a basis of the second three-dimensional coordinate sets and the second camera parameter set, wherein in process (a6), the evaluation value is calculated on a basis of first differences between the pixel values at the first pixel coordinate pairs in the first image and the pixel values at the second pixel coordinate pairs in the second image and second differences between pixel value at the third pixel coordinate pairs in the first image and pixel values at the fourth pixel coordinate pairs in the second image.
 6. The camera parameter set calculation method according to claim 5, wherein in process (a6), each of the first differences is an absolute value of a difference between the pixel value at the first pixel coordinate pair in the first image and the pixel value at the second pixel coordinate pair in the second image, and each of the second differences is an absolute value of a difference between the pixel value at the third pixel coordinate pair in the first image and the pixel value at the fourth pixel coordinate pair in the second image, and wherein the third pixel coordinate pairs includes the third pixel coordinate pair and the fourth pixel coordinate pairs includes the fourth pixel coordinate pair.
 7. The camera parameter set calculation method according to claim 1, wherein the predetermined portion represents an image of a sky, wherein the third-dimensional position information includes information about an three-dimensional distance between the sky and the first camera, and wherein the three-dimensional distance between the sky and the first camera is set to a value considerably larger than a three-dimensional distance between the first camera and the second camera.
 8. The camera parameter set calculation method according to claim 1, wherein the predetermined portion represents an image of a plane formed by an object in three-dimensional space, and wherein the third-dimensional position information includes information about an three-dimensional position of the plane.
 9. The camera parameter set calculation method according to claim 8, wherein the plane represents a road surface.
 10. The camera parameter set calculation method according to claim 8, wherein the plane represents a ceiling surface of a structure.
 11. The camera parameter set calculation method according to claim 8, wherein the plane represents a wall surface of a structure.
 12. The camera parameter set calculation method according to claim 1, wherein current position information is acquired from a range finder, and wherein the current position information includes position information about the predetermined portion around the first camera.
 13. A non-transitory computer-readable recording medium storing a control program executable by an apparatus including a processor, the control program comprising code to perform: (a1) acquiring a first image captured by a first camera and a second image captured by a second camera; (a2) acquiring a first camera parameter set including one or more camera parameters of the first camera and a second camera parameter set including one or more camera parameters of the second camera; (a3) extracting, from the first image, a predetermined portion of an object having three-dimensional position information; (a4) calculating three-dimensional coordinate sets corresponding to the predetermined portion on a basis of the three-dimensional position information, the first image, and the first camera parameter set; (a5) determining first pixel coordinate pairs of the predetermined portion of the first image on a basis of the three-dimensional coordinate sets corresponding to the predetermined portion and the first camera parameter set and determining second pixel coordinate pairs in the second image corresponding to the predetermined portion on a basis of the three-dimensional coordinate sets and the second camera parameter set; (a6) calculating an evaluation value on a basis of pixel values at the first pixel coordinate pairs in the first image and pixel values at the second coordinate pairs in the second image; (a7) updating the first camera parameter set and the second camera parameter set on a basis of the evaluation value; and (a8) outputting the updated first camera parameter set and second camera parameter set.
 14. A camera parameter set calculation apparatus comprising a processing circuit that calculates camera parameters of at least two cameras, the processing circuit performing the following operations: (a1) acquiring a first image captured by a first camera of the at least two cameras and a second image captured by a second camera of the at least two cameras; (a2) acquiring a first camera parameter set including one or more camera parameters of the first camera and a second camera parameter set including one or more camera parameters of the second camera; (a3) extracting, from the first image, a predetermined portion of an object having three-dimensional position information; (a4) calculating three-dimensional coordinate sets corresponding to the predetermined portion on a basis of the three-dimensional position information, the first image, and the first camera parameter set; (a5) determining first pixel coordinate pairs of the predetermined portion of the first image on a basis of the three-dimensional coordinate sets corresponding to the predetermined portion and the first camera parameter set and determining second pixel coordinate pairs in the second image corresponding to the predetermined portion on a basis of the three-dimensional coordinate sets and the second camera parameter set; (a6) calculating an evaluation value on a basis of pixel values at the first pixel coordinate pairs in the first image and pixel values at the second coordinate pairs in the second image; (a7) updating the first camera parameter set and the second camera parameter set on a basis of the evaluation value; and (a8) outputting the updated first camera parameter set and second camera parameter set. 